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

조회 수: 1 (최근 30일)
Yasin B.
Yasin B. 2015년 1월 11일
댓글: Star Strider 2015년 1월 11일
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.

답변 (2개)

Star Strider
Star Strider 2015년 1월 11일
I would use the isletter function.

Yasin B.
Yasin B. 2015년 1월 11일
This is exactly what i'm looking for.. Thank you!

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by