loading a two dimensional data from a file
1 view (last 30 days)
Show older comments
how to upload data from a file of 2 dimensional with columns varying for each row using matlab.yhe variables are floating points.so if i am storing it in cell array even . and space between two values is occupying memory.wastage of memory
4 Comments
Answers (1)
Walter Roberson
on 19 Mar 2014
indata = {};
while true
linein = fgetl(fid);
if ~ischar(linein); break; end
indata{end+1} = sscanf(linein, '%g');
end
See Also
Categories
Find more on Workspace Variables and MAT-Files 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!