-
2 Comments
Praveen Suvarna
on 21 Nov 2012
function y = cleanUp(x)
x=[5 17 -20 99 3.4 2 8 -6]
for i=1:8
if (x(i)<0||x(i)>10)
y(i)=NaN;
else
y(i)=x(i);
end
end
Can anybody tell what is wrong with this code so that it is not clearing test 2.
Aditya Suryavanshi
on 24 Dec 2012
Check this:Solution 181284.
x is input matrix which will vary rather being defined as in above program.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!