This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Daniel Fernandez
on 1 Sep 2016
I wrote:
function y = everyOther(x)
n=0;
for i=1:length(x)
if rem (i,2)==0
n=n+1
y(i-n)= x(i-1);
end
end
end
Could someone explain why it failed?
SIVAPRAKASH DANABALASINGAM
on 10 Jan 2017
nice
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!