필터 지우기
필터 지우기

How do I resolve the Improper index matrix reference error?

조회 수: 3 (최근 30일)
matlablearner
matlablearner 2014년 8월 18일
답변: Kelly Kearney 2014년 8월 18일
I am using the plot command. And the code goes like plot(axeshandles,xval,yval) where xval is a coloumnmatrix with 3999 coloumns and yval is a rowmatrix with 3999 rows. At this point of execution, the " Improper index matrix reference error" pops up. Kindly request your inputs on the above problem. Thanks in Advance.

답변 (2개)

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2014년 8월 18일
Hi
I guess there should not be a problem plotting a vector and column but why not try to make them both column or row at least just when you're plotting? So, so try below and let us know if the problem is not solved.
plot(axeshandles,xval',yval);
Notice the xval changed to xval' so MATLAB plots a xval' which is 3999 row and a yval which is 3999 rows, you should be fine with this.
Hope this helps.
Good Luck!

Kelly Kearney
Kelly Kearney 2014년 8월 18일
Type
which plot -all
Is there a variable named plot overshadowing the function?

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by