[Scilab-users] Help with reading data (csvRead)

Samuel Gougeon sgougeon at free.fr
Sat Dec 10 12:43:45 CET 2016


Hello Claus,
Could you please post a true extract of your file, as a file /in 
attachement/, after that you checked than the issue occurs also with 
this extract file?
It will be easier to test the issue, and it will lead to more reliable 
tests than copying/pasting a part of your message in a file.
Regards
SG

Le 10/12/2016 11:22, Claus Futtrup a écrit :
>
> Hi
>
> I'm trying to read a datafile with csvRead, it might be the wrong 
> function. Please help. The file itself looks like this (only showing 
> select lines - the file contains 391 lines):
>
> ****************************************************
> * FILE:C:\Users\claus\example.zma
> * INFO: Arb1
> * Data: Impedance (ohms), Phase (degrees)
> ****************************************************
>    10.000    +8.8488   +40.1693
>    10.199    +8.9648   +40.7994
>    11.949   +10.0946   +46.1555
>    12.188   +10.2827   +46.7923
>   141.879    +6.7485   -10.8804
>   144.715    +6.7473   -10.3382
>   147.608    +6.7438    -9.8380
>   150.559    +6.7377    -9.3570
>   389.346    +7.2282    +9.7230
>   397.129    +7.2456   +10.0717
>   987.112    +8.5967   +23.3368
>  1006.846    +8.6355   +23.7056
>  9807.309   +26.8760   +57.2720
> 10003.368   +27.2519   +57.4330
> 20000.000   +44.3153   +62.1741
>
> csvRead complains because the column width is changing. I execute:
>
> localdir = "C:\Users\claus\";
> filename = fullfile(localdir,"example.zma");
> Mread = csvRead(filename,"",".","double",[],[],[],5);
>
> This is the error which csvRead gives (line 10 == line 3 in above 
> shortened dataset):
>
> >Warning: Inconsistency found in the columns. At line 10, found 12 
> columns while the previous had 13.
> > !--error 999
> >csvRead: can not read file C:\Users\claus\example.zma: Error in the 
> column structure
>
> What is the recommended way to read the ZMA file?
>
> P.S. ZMA = Impedance with 1) Frequency, 2) Magnitude and 3) Phase data.
>
> /Claus
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161210/ae775073/attachment.htm>


More information about the users mailing list