Publisher review:readascii reads ascii files and prepares them for load compatibility. Reads ASCII FilesUSAGE:argout = readascii(argin)DESCRIPTION:Reads an ascii file and returns (if nargout==1) a structure with several fields including the headers, text and nuemrica data. If the name for an out-file is given, the file is changed for MatLab loadcompatibility commenting all "text" lines and inserting NaN'. The out file may be saved as binary, which only saves the data of the in-file.INPUT VARIABLE:argin is a structure array with fields:infile = file to be read outfile = name of out-file (only if given)outperm = permision for out file used for fopen.mexamples - 'w', 'wb', 'a ', etcdefault - 'w' outprec = precision for out file used for fwrite.mexamples - 'uchar', 'int8', 'single', 'double'default - 'uchar'old = text or numbers that want to be replacedIf more than one number or text needs to be replaced, old may be given as a cell array examples - -9999, {'0000','-----'}default - '*****'new = text or number that replaces olddefault - 'NaN'OUTPUT VARIABLE:argout is a structure array with the same fields as argin, plus:header(s) = heading of file and/or any row with characters other than e that are commented in an ascii out file any line starting with % or any non alphabet characterstext = string data in filedata = vector or matrix with data read from file
flag = text indicating whether all data was read, if there exist rows with different number of columns in the in file, and the amount of data written to a binary fileNOTES:Using outfile == infile is valid but slows the program down considerably.The uigetfile dialog is invoked if nargin==0.Commenting a linea twice or any data linea with NaN' is avoided.Only permits writing to binary file if the ascii file contains only one data size Requirements: ยท MATLAB Release: R14
readascii is a Matlab script for Scientific/Engineering scripts design by alex sanchez.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
readascii reads ascii files and prepares them for load compatibility.
Operating system:Windows / Linux / Mac OS / BSD / Solaris