how to put a list numbers from the user into a matrix in matlab
2 ビュー (過去 30 日間)
古いコメントを表示
Okay, so I want to ask the user for a list of numbers, is there a way to take that list and turn it into a matrix.
0 件のコメント
回答 (2 件)
Azzi Abdelmalek
2016 年 4 月 16 日
s=inputdlg('enter your matrix like this [1 2;4 6]');
out=str2num(s{:})
2 件のコメント
Image Analyst
2016 年 4 月 16 日
You can use a uitable. Use GUIDE and place a grid control on it. Then somewhere in your code, stick your data into it like this:
uitable1.data = yourData;
where uitable1 is the "tag" name of your control that you placed on the GUI.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!