Please explain this syntax

1 回表示 (過去 30 日間)
ANARKENUNG
ANARKENUNG 2015 年 9 月 12 日
回答済み: Walter Roberson 2015 年 9 月 12 日
A=importdata(filename,delimiterIn,headlinersIn);
>> for k=[3,5]
disp(A.colheaders{1,k})
disp(A.data(:,k))
disp(' ');
end
what does 3rd , 4th, 5th line mean? can anyone explain?

回答 (2 件)

Star Strider
Star Strider 2015 年 9 月 12 日
‘what does 3rd , 4th, 5th line mean? can anyone explain?’
The disp function displays whatever is in its argument to the Command Window.

Walter Roberson
Walter Roberson 2015 年 9 月 12 日
For some kinds of files, importdata() returns a structure. One field of the structure is a cell array of strings that are the column headers that were read, and another field of the structure is a numeric array of the data that was read. The loop is going around for certain columns displaying the column header and then the data for that column, and then a blank line.

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by