errors in my code

조회 수: 1 (최근 30일)
nour
nour 2022년 12월 12일
댓글: nour 2022년 12월 13일
the reset and complement functions don't work even though I wrote the codes for them correctly
app.UIAxes.cla;
app.UIAxes2.cla;
app.img = "";
app.img2 = "";
app.img2 = imcomplement(app.img);
imshow(app.img2 , 'Parent', app.UIAxes2);

채택된 답변

Image Analyst
Image Analyst 2022년 12월 12일
Not sure of your definition of "correctly". Yes, that won't give a syntax error, but it's not correct.
You are setting two global variables (fields of the global app variable): img and img2. These are set to the null string.
imcomplement takes an image variable as an input -- an actual numerical matrix, not a character string.
  댓글 수: 5
Image Analyst
Image Analyst 2022년 12월 13일
Try
cla(app.UIAxes);
nour
nour 2022년 12월 13일
it worked thank you very much

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by