Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

matlab error

Asked by James on 14 Aug 2011

??? Index exceeds matrix dimensions.

Error in ==> motionEstTSS at 154 imwrite((Best_Predicted_Frame_mov(1,c).cdata),filename,'jpg');

Any ideas?

Line 153: filename = strcat('Best_Predicted_Frame',num2str(c),'.jpg');

Line 154: imwrite((Best_Predicted_Frame_mov(1,c).cdata),filename,'jpg');

1 Comment

Yoav Livneh on 14 Aug 2011

What is the variable c? It appears the array Best_Predicted_Frame_mov is smaller than the value of c.

James

Products

No products are associated with this question.

1 Answer

Answer by Fangjun Jiang on 14 Aug 2011

The following will cause the same error. Check the size of your variable Best_Predicted_Frame_mov and the value of variable c.

a=rand(10,1);
b=a(11,1);

0 Comments

Fangjun Jiang

Contact us