필터 지우기
필터 지우기

How to load Excel .xlsx and .mat files into Matlab?

조회 수: 7 (최근 30일)
Josh Belandres
Josh Belandres 2020년 4월 25일
댓글: Josh Belandres 2020년 4월 25일
I was able to import a .xlsx file and a .mat file containing data that I need to use for my code. However when I use "load FileName" I get an error that says "unable to read file. No such file or directory." Please let me know how to do this.
  댓글 수: 1
Sindar
Sindar 2020년 4월 25일
Are you in the same folder as the file? Have you double-checked the spelling and extension (I can't tell you how many times I've been just slightly off).

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

채택된 답변

per isakson
per isakson 2020년 4월 25일
편집: per isakson 2020년 4월 25일
The function, load(), cannot read excel-files.
"when I use "load FileName" I get an error" FileName is that the name of a mat-file? Or is FileName the name of a variable, the value of which is the name of a mat-file?
If FileName is the the name of a mat-file
load FileName
should work
If FileName is the name of a variable, the value of which is the name of a mat-file
load( FileName )
should work
See load()
  댓글 수: 1
Josh Belandres
Josh Belandres 2020년 4월 25일
Yes, I needed to use the load() function when reading mat. file and the xlsread function when reading excel files.
However to fix the errors I put my downloaded data into a new folder within the matlab folder, restarted matlab and then was able to load the data from the workspace.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by