Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
24
Добавлен:
09.02.2015
Размер:
324.1 Кб
Скачать

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)

Соседние файлы в папке Библиотеки Matlab