Enter a string instead of a number in edit text, warning message matlab gui

1 Ansicht (letzte 30 Tage)
i created a gui with edit text and a pushbutton. if you enter a string instead of a number in an edit text, i want a warning message, 'You've entered a letter. Please enter a number!'
i know the warning message code; warndlg('You've entered a letter. Please enter a number!','Warning','modal');
but i dont know string/number contradiction. it can be done with if loop i believe. but how? please help.

Antworten (2)

Star Strider
Star Strider am 11 Jan. 2015
I would use the isletter function.

Yasin B.
Yasin B. am 11 Jan. 2015
This is exactly what i'm looking for.. Thank you!

Kategorien

Mehr zu Characters and Strings 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