필터 지우기
필터 지우기

Index exceeds matrix dimensions when saving the data?

조회 수: 3 (최근 30일)
Maria
Maria 2014년 7월 31일
답변: Aurele Turnes 2014년 8월 8일
I have tried to save matlab arrays in a file data_tables.mat as follows: save('data_tables','N1amprighthp','P2amprighthp','N1latrighthp','P2latrighthp','MEGchannels','subjects');
but get an error: ??? Index exceeds matrix dimensions.
Could you please let me know what I am doing wrong?
Thanks, Maria
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2014년 7월 31일
편집: Geoff Hayes 2014년 7월 31일
Maria - what are the dimensions of your variables? Are they numeric or text arrays? Cell arrays? I created some dummy data, each with the names that you specified above, and was able to execute the save.

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

답변 (1개)

Aurele Turnes
Aurele Turnes 2014년 8월 8일
It is also possible that you get this error because you have a variable called save in your workspace. If that is the case, when you try executing the save function, MATLAB refers to the local variable instead and returns an error. To solve this issue, make sure to rename your variable by doing:
my_save = save;
clear('save');

카테고리

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