Matlab Error Message

조회 수: 1 (최근 30일)
James
James 2011년 7월 29일
Hi
My algorithm is strangely not working. Please help I get the below error:
??? Undefined variable Best_Predicted_Frame_mov.
Error in ==> MotionEstimationV2_salesman at 99
imwrite((Best_Predicted_Frame_mov(1,c).cdata),filename,'jpg');

답변 (3개)

the cyclist
the cyclist 2011년 7월 29일
Sounds like the variable "Best_Predicted_Frame_mov" has not been defined at line 99 of "MotionEstimationV2_salesman". I suggest you breakpoint your code there to see what the workspace looks like.

James
James 2011년 7월 29일
When I put a break there it gives...
c: 1x1 double = 1
filename: 1x25 char = Best_Predicted_Frame1.jpg
No other detail - help.
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2011년 7월 29일
check what is the value for the variable "Best_Predicted_Frame_mov"?
the cyclist
the cyclist 2011년 7월 29일
It sounds like that variable has not yet been created. Can you trace back and understand why you thought it would be there, and why it isn't?

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


Walter Roberson
Walter Roberson 2011년 7월 29일
Before you first assign to Best_Predicted_Frame_mov add the statement
global Best_Predicted_Frame_mov
Then, just before you try to imwrite() it, again have the statement
global Best_Predicted_Frame_mov
If that solves the problem then either you could just leave it that way, or it would give us useful information towards tracking down why what you had was not working for you.

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by