for Loop counting Array
显示 更早的评论
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
回答(1 个)
Star Strider
2021-3-17
0 个投票
I prefer using inputdlg for the inputs. Then see the documentation section on Matrix Indexing to understand how to create the vector.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!