-->[fid,err] = mopen('test1.csv','rb')
err =
0.
fid =
1.
-->xxx = read(1,11,8)
!--error 243
C file logical unit not allowed here
!--error 49
incorrect file or format
The data in the file basically look like
ABS
-30
30
10
5
0.35 0.346 -1.142859
0.177 0.205 0.238 0.279 0.314 0.371 0.409 0.444
0.169 0.206 0.243 0.29 0.323 0.374 0.411 0.435
0.161 0.203 0.231 0.272 0.321 0.364 0.399 0.428
0.162 0.197 0.221 0.269 0.312 0.368 0.399 0.42
0.153 0.185 0.22 0.274 0.313 0.356 0.382 0.42
etc.
Thanks a lot for your help!
Grace
I would use something like:
fd=mopen("myfile.csv");
// read header
he=mgetl(fd,6);
// process header
// ... use msscanf on he elements ...
// read data
da=mgetl(fd,-1);
mclose(fd);
//process data
//...
--
Francois Vogel
1-888-MY-ETHER ext. 01907199
<http://www.ether.com/CallButton/Francois-Vogel/6887475.aspx>
<http://www.ether.com>