필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

why is error?

조회 수: 1 (최근 30일)
Pan
Pan 2012년 5월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
load can
for i=5:330
RGB= xz(:,:,:,i);
YCBCR = rgb2ycbcr(RGB);
figure(20);
imshow(YCBCR);
drawnow;
end
save can xzycbcr
this is my code
??? Error using ==> save
Variable 'xzycbcr' not found.
Error in ==> YCbCr at 12
save can xzycbcr
this is error
why is error?
please tell me ,thank!

답변 (2개)

Honglei Chen
Honglei Chen 2012년 5월 22일
There is no variable xzycbcr defined in your code., I only see YCBCR
  댓글 수: 2
Pan
Pan 2012년 5월 22일
If I want to save can in the two variable in worlspace, then how I need to do?
Honglei Chen
Honglei Chen 2012년 5월 22일
True, thanks for pointing that out Daniel. I'll repeat below and delete the previous comment
save can YCBCR RGB
But please read Daniel's answer as he has a very good point regarding your variable name.

Daniel Shub
Daniel Shub 2012년 5월 22일
The error is pretty straight forward. The command
save can xzycbcr
is trying to save the variable "xzycbcr" into a file called "can.mat", but there is no variable called "xzycbcr". Maybe you are trying to save the variables "xz" and "ycbcr" and have left out a space, but I don't see those variables in your workspace since MATLAB is case sensitive.
Having a variable called YCBCR in a script called YCbCr is bound to cause you confusion.

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by