Error with importing data into Matlab

조회 수: 9 (최근 30일)
Claire Harnett
Claire Harnett 2014년 2월 22일
답변: Thomas 2014년 2월 22일
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
Star Strider
Star Strider 2014년 2월 22일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Thomas
Thomas 2014년 2월 22일
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.

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by