MATLAB can't find my file

조회 수: 158(최근 30일)
Tom
Tom 2012년 12월 12일
댓글: Alireza Kharazmi 2016년 8월 8일
I'm trying to read in an excel spreadsheet and I can't get it to do it.
I put the spreadsheet in the MATLAB home directory, then I put this: -
M = xlsread('Psych_anon_mine.xlsx');
And I get the error message: -
??? Error using ==> xlsread at 214 XLSREAD unable to open file Psych_anon_mine.xlsx. File /Users/Tom**********/Documents/MATLAB/Psych_anon_mine.xlsx not found.
(The stars are just my last name)
Error in ==> Ass_2_data_A at 3 M = xlsread('Psych_anon_mine.xlsx');
Any help would be greatly appreciated

채택된 답변

Walter Roberson
Walter Roberson 2012년 12월 12일
(Looks like you are using OS-X)
At the MATLAB command prompt, try
!ls ~/Documents/MATLAB/Psych_anon*
and see if it finds the file. Perhaps there is a hidden extension.
  댓글 수: 7
Alireza Kharazmi
Alireza Kharazmi 2016년 8월 8일
My apologies for late response, thank you very much for your help Walter. My problem is fixed now.

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

추가 답변(1개)

Tom
Tom 2012년 12월 12일
Yes thanks that worked. I just copied and pasted the address from that and it's working now. Many thanks.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 12월 12일
Was there a hidden extension? Or was there a typo in the file name?

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by