Hi,(adsbygoogle = window.adsbygoogle || []).push({});

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 thevector. 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.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab problen with reading from files - need help

Loading...

Similar Threads for Matlab problen reading |
---|

Binary bitstream from QPSK with MATLAB? |

Python How can I run Python by getting values from Matlab |

What is each step of this Matlab program doing? |

C/++/# Help with MATLAB code? |

Numerical Integration with variable limits MATLAB |

**Physics Forums | Science Articles, Homework Help, Discussion**