isspace finds wrong spaces in ascii file
Show older comments
Hi.
I am using the function below to create separations in my line file. It used to work just fine, however for some reason it now sets the spaces at non-space places (e.g., 75666 83929 92920---created '5666' '3929' '2920').
[rows] = size( line );
for R = 1:rows
sep {R,1} = find( isspace ( line{R} ) );
end
Any advise would be highly appreciated.
Best Regards Dana
1 Comment
Jan
on 4 May 2011
I do not see how the posted code converts "75666 83929 92920" to '5666' '3929' '2920'.
After "rows = size(line)" the variable "rows" is a vector. Therefore "for R=1:rows" does not what you expect most likely.
Please explain the input exactly (what is "line"?) and the wanted output.
Accepted Answer
More Answers (0)
Categories
Find more on Downloads 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!