Input value in Edit text in MATLAB GUI

조회 수: 3 (최근 30일)
Avinav Kumar
Avinav Kumar 2019년 4월 5일
답변: Walter Roberson 2019년 10월 13일
Hi,
I am building an APP in MATLAb gui. I have created a edit text box. The box accepts positive values . However when i put 5-2 the edit text box accepts this as 3 value. i want to remove this and ensure edit text box only accepts postive values as 3 and not 5-2. How to do that
Thank you

답변 (1개)

Walter Roberson
Walter Roberson 2019년 10월 13일
Use str2double() instead of str2num() .

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by