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 Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by