Please explain this syntax
2 views (last 30 days)
Show older comments
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?
0 Comments
Answers (2)
Walter Roberson
on 12 Sep 2015
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.
0 Comments
See Also
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!