Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Tiger
Posts:
83
Registered:
6/22/12


textscan
Posted:
Nov 27, 2012 11:53 AM


Hi all,
Suppose I have a text file as follows: 1 4 6 3 6,7 4 3 2 5 7,6 4 5 3 5 6,5
What "option" should I use in 'textscan' to be able to extract the last two numbers together as one variable. Many thanks in advance guys.
For the time being, here's my code: fid = fopen('WF.txt'); linenum = 11; a = textscan(fid, '%f %f %f %f %f', 1, 'delimiter', '', 'emptyvalue', 'headerlines', linenum1); J_ID = a{1}; T_ID = a{2}; Cores = a{3}; T_ET = a{4}; Deps = num2cell(a{5}); % Here's the problem, I'd like to have the last two numbers concatinated with a comma to equal 'Deps'. I'm not sure how. I tried EndOfLine, but it didn't work. ______________ Regards, T


Date

Subject

Author

11/27/12


Tiger

11/27/12


dpb


