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.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!