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

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (2)

Star Strider
Star Strider il 11 Gen 2015
I would use the isletter function.

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

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by