generating a sequence 1,2,3,4,....,n
119 views (last 30 days)
Show older comments
Without using a for loop, how can I generate an index 1,2,3,...,n?
0 Comments
Accepted Answer
R.U.F.
on 21 Apr 2012
vector=[1:stepsize:n] if the stepsize =1 as in your case, you can disregard it
1 Comment
More Answers (1)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!