This solution is outdated. To rescore this solution, sign in.
-
2 Comments
SIVAPRAKASH DANABALASINGAM
on 10 Jan 2017
very easy
David Verrelli
on 24 Mar 2017
Well done. For your interest, the second loop is not required, as "mod(i+2,2)+1:2:n" can be used directly as an index.
Suggested Problems
-
1334 Solvers
-
2499 Solvers
-
435 Solvers
-
Flip the vector from right to left
9638 Solvers
-
9360 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!