TEXTSCAN Reads from Fortran Output - Precision Problem
이전 댓글 표시
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".
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Fortran with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!