- #1
confi999
- 19
- 0
Hi,
I have a formatted data file (obtained from fortran) which has 1 column and 24000 rows. The values are like
-0.8736252526127E-9
-0.1928287267367E-11
0.28373737626278E-12
etc etc.
I have tried to read these data in MATLAB using the following command :
fid=fopen('filename');
[b,count]=fscanf(fid,'%25f',[1,inf]);
fclose(fid);
I have tried with %g as well as the format specifier. Then I have also tried to use 'load' command of matlab. In all the cases I end up with wrong values of the data in the vector. I get somethiing like 0.0001, -0.0005, 0.003, etc ... These are far larger values compared to those in the source file.
Can anyone advise me - how I can read those data successfully in matlab.
Thank you.
I have a formatted data file (obtained from fortran) which has 1 column and 24000 rows. The values are like
-0.8736252526127E-9
-0.1928287267367E-11
0.28373737626278E-12
etc etc.
I have tried to read these data in MATLAB using the following command :
fid=fopen('filename');
[b,count]=fscanf(fid,'%25f',[1,inf]);
fclose(fid);
I have tried with %g as well as the format specifier. Then I have also tried to use 'load' command of matlab. In all the cases I end up with wrong values of the data in the vector. I get somethiing like 0.0001, -0.0005, 0.003, etc ... These are far larger values compared to those in the source file.
Can anyone advise me - how I can read those data successfully in matlab.
Thank you.