Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
Solution Stats
Problem Comments
4 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers11171
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15798 Solvers
-
2249 Solvers
-
Set the array elements whose value is 13 to 0
1445 Solvers
-
745 Solvers
-
547 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Easy
Is this just about natural number? Otherwise the tests should include negative integer numbers.
why should use square brackets when colon just work
Easy to solve