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@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to