Why do I keep getting this error in my app designer?

1 Ansicht (letzte 30 Tage)
Hind Aljallaf
Hind Aljallaf am 13 Mai 2023
Bearbeitet: Hiro Yoshino am 14 Mai 2023
I keep getting this error for a reason I am not sure off. I did train my folder, and I also made sure to input the correct name for the file within the code. What am I doing wrong? What does this error mean?
this is how the application looks like incase you might need it.
  1 Kommentar
Simon Chan
Simon Chan am 13 Mai 2023
Just have a quick look, the name of the function should be strcmp instead of strcmps

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Hiro Yoshino
Hiro Yoshino am 14 Mai 2023
Bearbeitet: Hiro Yoshino am 14 Mai 2023
(1) This might be irrelevant ... You should change "ans" to something else since ans is already taken.
(2) strcmp, "string" is redundant.
myAns = "tulip";
if (strcmp(myAns,"tulip"))
app.Lamp.Color = "Pink";
app.Lamp.Color = "Purple";
Another approach is using "switch".


Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by