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
Suggested Problems
-
43086 Solvers
-
2064 Solvers
-
485 Solvers
-
565 Solvers
-
458 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!