readtext 1.0

Operating systemsOS : Windows / Linux / Mac OS / BSD / Solaris
Program licensingScript Licensing : Freeware
CreatedCreated : Sep 26, 2007
Size downloadDownloads : 2
Program licensing
Thank you for voting...

Usage: [data, result]= readtext(source, delimiter, ...

Usage: [data, result]= readtext by Peder Axensten(source, delimiter, comment, quotes, options)
Whatever text (file) you give it, readtext 1.0 returns an array of the contents (or send me a bug report). Matlab can't read variable length lines or variable type values with the standard library. readtext [readtext1.0.exe] can read any text file. Any string (or even regexp) can be delimiting, default is a comma. Everything after (and including) a comment character, until the line end, is ignored. Quote characters may also be given, everything between them is treated as one item. There are options to control what will be converted to number and how empty items are saved.
If you find any errors, please let me know: peder at axensten dot se.
source: the file to be read. May be a file path or just the file name. OR: The text itself, see 'textsource', below.
delimiter: (default: ', ') any non-empty string. May be a regexp, but this is slow on large files.
comment: (default: '') zero or one character. Anything after (and including) this character, until the end of the line, will be ignored.
quotes: (default: '') zero, one (opening quote equals closing), or two characters (opening and closing quote) to be treated as paired braces. Everything between the quotes will be treated as one item. The quotes will remain. Quotes may be nested.
options: (default: '') may contain (concatenate combined options):
- 'textsource': source contains the actual text to be processed, not the file name.
- 'textual': no numeric conversion ('data' is a cell array of strings only),
- 'numeric': everything is converted to a number or NaN ('data' is a numeric array, empty items are converted to NaNs unless 'empty2zero' is given),
- 'empty2zero': an empty field is saved as zero, and
- 'empty2NaN': an empty field is saved as NaN.
- 'usewaitbar': call waitbar to report progress. If you find the wait bar annoying, get 'waitbar alternative' at http://www. mathworks. com/matlabcentral/fileexchange/loadFile. do? objectId=11398
data: A cell array containing the read_text, divided into cells by delimiter and line endings. 'data' will be empty if the file is not found, could not be opened, or is empty. With the option 'numeric', 'data' will be a numeric array, with 'textual', 'data' will be a cell array of strings only, and otherwise it will be a mixed cell array. For Matlab < version 7, returned strings may contain leading white-space.
result: a structure:
. min: minimum number of columns found in a line.
. max: number of columns in 'data', before removing empty columns.
. rows: number of rows in 'data', before removing empty rows.
. numberMask: true, if numeric conversion ('NaN' converted to NaN counts).
. number: number of numeric conversions ('NaN' converted to NaN counts).
. emptyMask: true, if empty item in file.
. empty: number of empty items in file.
. stringMask: true, if non-number and non-empty.
. string: number of non-number, non-empty items.
. quote: number of quotes.
EXAMPLE 1: [a, b]= readtext - 0MB('txtfile', '[, ]', '#', '"', 'numeric-empty2zero')
This will load the file 'txtfile' into variable a, treating any of tab or comma as delimiters. Everything from and including # to the next newline will be ignored. Everything between two double quotes will be treated as a string. Everything will be converted to numbers and a numeric array returned. Non-numeric items will become NaNs and empty items are converted to zero.
EXAMPLE 2: a= readtext 1.0('The, actual, text, to, process', ', ', '', '', 'textsource')
This will process the actual text string, returning a cell string of the five words.
Demands:
• MATLAB Release: R13SP1

readtext 1.0 scripting tags: empty, numeric, data, readtext, scientific engineering, read text, file, array, matlab text, number. What is new in readtext 1.0 software script? - Unable to find readtext 1.0 news. What is improvements are expecting? Newly-made readtext 1.1 will be downloaded from here. You may download directly. Please write the reviews of the readtext. License limitations are unspecified.