error(mess​age('MATLA​B:csvread:​FileNotFou​nd'))

I am trying to to import data into my script and I am getting the following message "error using csvread(line35) File not found" and line35 in the csvread.m script is stating 'error(message('MATLAB:csvread:FileNotFound'))'

답변 (1개)

Walter Roberson
Walter Roberson 2017년 8월 11일

0 개 추천

Well, that seems clear. You are asking to import a file that is not in your current directory and is not on your MATLAB path.
If you used something like uigetfile() to have the user select a file, or if you used dir() on a directory to find the file names, you probably forgot to add the directory name into the file name. For example,
[basename, filepath] = uigetfile('*.csv', 'Select a dataset');
if isnumeric(filename);
uiwait(msgbox('User cancelled'));
return
end
filename = fullfile(filepath, basename);
data = csvread(filename);

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2017년 8월 10일

답변:

2017년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by