isspace finds wrong spaces in ascii file
이전 댓글 표시
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
Jan
2011년 5월 4일
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!