how to read a file and convert to matrix format
2 views (last 30 days)
Show older comments
Sharen H on 28 Sep 2012
i am reading a file which has the values in the form
v -0.141202 5 5
v 3 5 5
v 4 5 5
i want to convert this in the form of a cell ignoring space ie in the form of 3X4 matrix
Thanks in advance
Azzi Abdelmalek on 28 Sep 2012
fid = fopen('filename.txt');
Azzi Abdelmalek on 1 Oct 2012
for jj =1:4
More Answers (1)
Sumit Tandon on 28 Sep 2012
There are several options - e.g. using Import Wizard or TEXTSCAN command.
Check out this link for more ideas.
Find more on Characters and Strings 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!