Create a vector from 0 to n by intervals of 2.
Solution Stats
Problem Comments
6 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers11434
Suggested Problems
-
Select every other element of a vector
36339 Solvers
-
5972 Solvers
-
4345 Solvers
-
1353 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
513 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Function names cannot begin with a number. Also, this is an extremely simple problem that has been posted many times. Please put more thought into problems before posting them.
I changed the problem slightly and added some more test cases.
Leading size is 0 !!!!!!!!!!!!
Tests are a lot of laugh...
" n = 10;
y_correct = (0:2:n);
assert(isequal(zeroToNby2(n),y_correct)) "
bin ich verrückt oder sind's die anderen?
gg ezz