MATLAB Answers

How to compare the strings inside the gui

1 view (last 30 days)
How to compare the strings inside the gui llike this
Ex. If the student number is A01, the male student is displayed, otherwise the female student is displayed.
I have read the syntax of strcmp, but I don't know how to use it.
please help me

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 23 Sep 2019
if strcmp(Student_Number, 'A01')
disp('the male student')
else
disp('the female student')
end

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.