How do we accept values and store them in a column array in a gui component like an edit box?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a gui and would like to accept various values from user and store them in a column array..For eg. if the values he enters are 6,4,7,3,8 my gui has to store them in an array like A=[6;4;7;3;8].
Please suggest a sample code if possible..Thanks.
0 件のコメント
採用された回答
Azzi Abdelmalek
2012 年 8 月 21 日
use an "Edit text" object
set(handles.EdittextName,'String','[0 0 0 0]')
a user has just to fill the Edit text object with desired values
to get these data use
A = str2num(get(handles.edit2,'String'));
3 件のコメント
Ken
2012 年 9 月 20 日
If you simply have [] around whatever you want the text to say it should work regardless of the size of the array.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!