필터 지우기
필터 지우기

mat file loading problem with matlab2015b

조회 수: 4 (최근 30일)
Abhinav
Abhinav 2017년 4월 28일
답변: Abhinav 2017년 5월 2일
I recently started using Matlab2015b and i have a problem with loading mat files. I get the error "Index exceeds matrix dimensions", though i have been using the same mat files since a year or two for the simulation environment. The loading works if i clear all other workspace variables or if i use import function. But it doesnt work if i drag drop or use load function from script. i would like to have a solution besides clearing workspace variable everytime i want to load a mat file.
  댓글 수: 1
Adam
Adam 2017년 4월 28일
Does it work if you use the
S = load(...)
syntax to load your variables into fields of a struct? Loading variables from a file straight into a workspace that already contains a bunch of variables is always somewhat dodgy.

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

채택된 답변

Stephen23
Stephen23 2017년 4월 28일
편집: Stephen23 2017년 4월 28일
You have created a variable named load, and you are attempting to index into it. Next time this error occurs, run these commands and tell us exactly what is printed:
which load -all
whos load

추가 답변 (1개)

Abhinav
Abhinav 2017년 5월 2일
Thank you for the help, i had not realised my mistake of using 'load' as a variable name.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by