errors in my code

1 vue (au cours des 30 derniers jours)
nour
nour le 12 Déc 2022
Commenté : nour le 13 Déc 2022
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);

Réponse acceptée

Image Analyst
Image Analyst le 12 Déc 2022
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 commentaires
Image Analyst
Image Analyst le 13 Déc 2022
Try
cla(app.UIAxes);
nour
nour le 13 Déc 2022
it worked thank you very much

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by