Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

i placed 'as.xls' file in matlab folder.

조회 수: 3 (최근 30일)
vipul utsav
vipul utsav 2013년 3월 10일
마감: MATLAB Answer Bot 2021년 8월 20일
i placed 'as.xls' file in matlab folder.
then i read data in matlab code using "xlsread('as.xls')"
the i got error that as.xls nlot found...what is probelm?
  댓글 수: 1
Jan
Jan 2013년 3월 10일
What exactly does "in matlab folder" mean?

답변 (2개)

the cyclist
the cyclist 2013년 3월 10일
My best guess is that you placed the file somewhere that is not on your current MATLAB search path. Where is the file?
You can see all the directories that MATLAB will search by typing
>> path
More details at
>> doc path

Image Analyst
Image Analyst 2013년 3월 10일
Please specify the full name of the file - that's the folder followed by the base filename.
yourFolder = 'c:/users/vipul/documents'; % or whatever.
if ~exist(yourFolder , 'dir')
message = sprintf('Error: folder does not exist:\n%s', yourFolder);
fprintf('%s\n', message);
uiwait(warndlg(message));
return;
end
baseFileName = 'as.xls';
fullFileName = fullfile(yourFolder, baseFileName);
if exist(fullFileName, 'file')
[numericalCells, textCells, rawCells = xlread(fullFileName);
else
message = sprintf('Error: Workbook does not exist:\n%s', fullFileName);
fprintf('%s\n', message);
uiwait(warndlg(message));
end

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by