Input value in Edit text in MATLAB GUI

1 回表示 (過去 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 Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by