How to prevent it from showing [1x76 char]?
Show older comments
Hi
I am doing a textread on a set of data, apparently when I look into the data at the command window. I notice there are strings that just show [1x76 char], does it mean that the matlab is unable to read data that are very long? Please enlighten, if I want to read the set of data. Thanks.
Example:
[1x76 char]
'$GPGSV,3,1,11,04,60,111,45,12,55,237,44,02,50,201,44,25,38,296,44*79' '$GPGSV,3,2,11,10,27,140,44,31,19,343,44,20,16,034,,23,14,058,*7C' '$GPGSV,3,3,11,17,13,110,43,29,07,277,,32,0.,013,*59'
[1x76 char]
'$GPGSV,3,1,11,04,60,111,45,12,55,237,44,02,50,201,44,25,38,296,44*79' '$GPGSV,3,2,11,10,27,140,44,31,19,343,44,20,16,034,,23,14,058,*7C' '$GPGSV,3,3,11,17,13,110,43,29,07,277,,32,0.,013,*59'
Regards, Casey
Accepted Answer
More Answers (1)
Jan
on 1 Oct 2012
C = regexp(path, pathsep, 'split');
C
According to the current width of your command window, the output is abbreviated to something like "[1 x 76 char]". This should avoid ambiguities with strings starting with 76 spaces, such that the interesting part is displayed right from the visible section.
It is debatable, if this is a useful procedure. But you can avoid it easily:
fprintf('%s\n', C{:});
Now you see all strings without smart abbrevs.
Categories
Find more on String Parsing 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!