How to output this cellarray?
1 view (last 30 days)
Show older comments
I am trying to create an output for this cellarray but I'm kind of stuck.
The function goes like this,
function Time = Rin
fid = fopen( 'Rincon.txt' );
Time = textscan( fid, '%d%d%d%d%d%f%f%f%f%f%s%s%s%f%f' ...
, 'Delimiter' , ' ' ...
, 'CollectOutput' , true ...
, 'HeaderLines' , 2 ...
, 'MultipleDelimsAsOne' , true ...
, 'Whitespace' , '' ...
);
fclose( fid );
end
When you press run, it gives this output,
Time =
[2163x5 int32] [2163x5 double] {2163x3 cell} [2163x2 double]
I want to know how can I output the first cell of the array ( [2163x5 int32] ) in the Command window?
In other words, to be shown as it goes in the workspace.
I appreciate your time.
0 Comments
Accepted Answer
Muruganandham Subramanian
on 24 Dec 2012
>>Time{1,1}
3 Comments
Azzi Abdelmalek
on 24 Dec 2012
I know they give the same result, since Time dimension is nx1, why to use Time{1,1} instead Time{1}?
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!