
- •Is the same as the previous syntax, but accepts attribute value pairs,
- •Xlsfinfo Determine if file contains Microsoft Excel spreadsheet.
- •Internet resource
- •Is a string. Message is either a string or a cell array. If it is a
- •Variables and the Windows registry.
- •Zip file access
- •Individual file can be specified relative to the current directory or
- •Tar file access
- •Individual file can be specified relative to the current directory or
- •Gzip file access
- •Individual file can be specified relative to the current directory or
- •Formatted file I/o
- •Icinterface/fgets
- •If %s is used an element read may cause several matlab matrix
- •Integer NaN as zero.
- •If true, textscan treats
- •File opening and closing
- •It on the matlab search path. On unix systems, filename may also start
- •Binary file I/o
- •If the most recent I/o operation was successful, message is empty
- •Indicator in the specified file. Position is indicated in bytes
- •Memory-mapped file support
- •Is correct for platform it's executed on.
- •Is also a valid partial pathname.
- •Serial port support
- •Instrfind will not find an object with a Name property value of
- •Instrfind will not find an object with a Name property value of
- •Timer support
- •Visible timer objects whose property names and property values match
- •Command window I/o
- •In the current directory. The folder contains an m-file for each web service
Integer NaN as zero.
TEXTSCAN imports any complex number as a whole into a complex
numeric field, converting the real and imaginary parts to the
specified type (such as %d or %f). Do not include embedded white
space in a complex number.
Character Strings Specifier Details
----------------- --------- -------------------------
Strings %s String
%q String, possibly double-quoted
%c Single character, including delimiter
Pattern-matching %[...] Read only characters in the brackets,
until the first nonmatching
character. To include ] in the set,
specify it first: %[]...].
%[^...] Read only characters not in the
brackets, until the first matching
character. To exclude ], specify it
first: %[^]...].
For each character (%c) specifier, TEXTSCAN returns a char array.
Other string specifiers return a cell array of strings.
Skipping fields or parts of fields:
Specifier Action Taken
--------- ------------
%*... Skip the field. TEXTSCAN does not create an output cell.
%*N... Ignore N characters of the field, where N is an integer
less than or equal to the number of characters in the
field.
Alternatively, include literal text to ignore in the specifier.
For example, 'Level%u8' reads 'Level1' as 1.
TEXTSCAN does not include leading white-space characters in the
processing of any data fields. When processing numeric data,
TEXTSCAN also ignores trailing white space.
If you use the default (white space) field delimiter, TEXTSCAN
interprets repeated white-space characters as a single delimiter.
If you specify a nondefault delimiter, TEXTSCAN interprets repeated
delimiter characters as separate delimiters, and returns an empty
value to the output cell.
Parameter Options:
Parameter Value Default
--------- ----------- -------
BufSize Maximum string length in bytes 4095
CollectOutput If true, TEXTSCAN concatenates 0 (false)
consecutive output cells with the
same data type into a single array.
CommentStyle Symbol(s) designating text to None
ignore. Specify a single string
(such as '%') to ignore characters
following the string on the same
line. Specify a cell array of two
strings (such as {'/*', '*/'}) to
ignore characters between the
strings. TEXTSCAN checks for
comments only at the start of each
field, not within a field.
Delimiter Field delimiter character(s) White space
EmptyValue Value to return for empty numer NaN
fields in delimited files
EndOfLine End-of-line character Determined
from file:
\n, \r, or \r\n
ExpChars Exponent characters 'eEdD'
Headerlines Number of lines to skip. Includes 0
the remainder of the current line.
MultipleDelimsAsOne 0 (false)