필터 지우기
필터 지우기

textread function parameters help

조회 수: 1 (최근 30일)
MENGZE WU
MENGZE WU 2021년 12월 15일
댓글: Walter Roberson 2021년 12월 15일
Data = textread(fullfile(fNames(i).folder, fNames(i).name), '', -1, 'headerlines', 2);
I got this matlab code, however, I can't figure out what ' ', -1 part means. Could anyone help me with that?

채택된 답변

Voss
Voss 2021년 12월 15일
As far as I can tell from reading the documentation for textread, those input arguments don't do anything special. They merely explicitly tell textread to do the default stuff ('' means don't skip any particular characters and -1 means read the whole file). It looks like the -1 can be omitted, but the '' (format specifier) needs to remain.
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 12월 15일
Using '' as the format is an undocumented option. It causes textread() to examine the first line of input (after any skipped headers) to try to figure out what the format of the file is.
If I recall correctly, when '' is used for the format, and other undocumented parameters are not used, then the inputs must be numeric. At the moment I do not recall whether comma separators are supported in this mode.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by