for Loop counting Array
1 回表示 (過去 30 日間)
古いコメントを表示
I'm trying to ask the user for an integer input, then store that value as N.
Making a for loop from 1:N creating an array storing elements from 1 to N vertically. like
1
2
3
to N
0 件のコメント
回答 (1 件)
Star Strider
2021 年 3 月 17 日
I prefer using inputdlg for the inputs. Then see the documentation section on Matrix Indexing to understand how to create the vector.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!