Why textscan inserts 0 instead of NaN ?
Show older comments
Hello,
I use textscan to import a text file which is a mixture of number and strings. The format is like:
VGAHFID,VGALFID,SN_hd
63484,49736,S410060Y_0
54696,54744,S410060Y_0
,,S410060Y_0
53092,54512,S410060Y_0
53716,54568,S410060Y_0
53800,54768,S410060Y_0
The command I used is a = textscan(fid,'%d%d%q','Headerlines',1,'Delimiter',',','EmptyValue',NaN);
Here's the result.
>> a{2} ans =
49736
54744
0
54512
54568
54768
If I changed the NaN to Inf, the missing value will be replaced with 2147483647.
I guess it must be my "a" format issue. But don't know how to solve it.
Thanks, Jane
Answers (0)
Categories
Find more on Propagation and Channel Models 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!