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

I have a text file with 3 columns (latitude, longitude, & station name) and 51 rows. Using fscanf I am able to read the first row of the file but not the whole file. Any ideas of how to read to the end of a text file that contains both numbers and letters?

This is what I have:

fid=fopen('latlon_LAstations.txt');

%station_lat=fscanf(fid,'%g',[1]);

%station_lon=fscanf(fid,'%g',[2]);

%station_name=fscanf(fid,'%s',[1]);

Thanks for you help,

Leah

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

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

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

# Matlab help, fscanf

Loading...

Similar Threads for Matlab help fscanf | Date |
---|---|

MATLAB MATLab: Not enough inputs for nlinfit | Nov 16, 2017 |

MATLAB Help needed to fix a matlab code | Nov 8, 2017 |

New to Matlab, help with vectors | Feb 20, 2016 |

Need help with integral | Dec 23, 2015 |

MATLAB 2D diffusion equation, need help for matlab code. | Nov 7, 2015 |

**Physics Forums - The Fusion of Science and Community**