Error with importing data into Matlab

18 Ansichten (letzte 30 Tage)
Claire Harnett
Claire Harnett am 22 Feb. 2014
Beantwortet: Thomas Seers am 22 Feb. 2014
Hi there,
I have a .txt file that has a list on longitudes and latitudes and I just want to plot the data. I haven't used MATLAB in a few years and so I seem to be coming across an error that I'm sure is simple to fix.
I thought I could just use: importdata('filename.txt') and then plot each column, but when I do that, the following error message is displayed: ??? Error using ==> importdata at 115 Unable to open file.
I checked the data but can't seem to see any reason why it can't import. Any help would be much appreciated?
Many thanks
  1 Kommentar
Star Strider
Star Strider am 22 Feb. 2014
Please post the relevant parts of your code, and attach part of your text file (or all of it if it’s not too long). Be sure your file is in the MATLAB search path.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Thomas Seers
Thomas Seers am 22 Feb. 2014
Looks like the error that is kicked out when the file isn't there. Check that it is in your work directory or include the full path as the string input to importdata.

Kategorien

Mehr zu Standard File Formats finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by