How to compare the strings inside the gui

2 visualizaciones (últimos 30 días)
han han
han han el 23 de Sept. de 2019
Respondida: Walter Roberson el 23 de Sept. de 2019
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 23 de Sept. de 2019
if strcmp(Student_Number, 'A01')
disp('the male student')
else
disp('the female student')
end

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by