take input in array
31 ビュー (過去 30 日間)
古いコメントを表示
if i want user to to input n number of values in the input window in array form how should i do it
0 件のコメント
採用された回答
Ameer Hamza
2020 年 10 月 9 日
vec = input('Enter an array: ')
run the above line and type
[1,2,3,4]
in the command window. You will get
>> vec
vec =
1 2 3 4
2 件のコメント
Ameer Hamza
2020 年 10 月 9 日
You can use the UI Editfield: https://www.mathworks.com/help/releases/R2020b/matlab/ref/uieditfield.html.
その他の回答 (1 件)
madhan ravi
2020 年 10 月 9 日
Use input() , enter the values in the form [1,5,4] an example.
doc input
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!