TEXTSCAN Reads from Fortran Output - Precision Problem
Ältere Kommentare anzeigen
I am reading the output data from a fortran generated file which is in the form
720. 2.715E+12 4.437E+10
730. 2.342E+12 3.849E+10
.
.
.
2700. 5.282E+01 1.852E+03
2710. 4.882E+01 9.521E+03
when I use the texscan as:
FormatSpec='%f %f %f'
cell=textscan(fileID,FormatSpec,N)
First column loads with no problem but MATLAB stores the last lines values for 2nd and 3rd column as zero. for instance for the 2nd column output is:
1.0e+12 *
2.7150
2.3420
.
.
.
0.0000
0.0000
and similar output for the 3rd column. Is there any way to tell MATLAB to store the data as they are(i.e. with the same format as they are read).
Thanks
The fortran format of the data for 2nd and 3rd columns is "1P5E9.2".
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Fortran with MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!