If I have my code as
function [value1, value2] = scope(input)c=1;x=length(input); for z=2:x if z==x break elseif input(z-1)>input(z) && input(z)<input(z+1) value1(c,1)=z; value2(c,1)=input(z); c=c+1; end end
Is it possible to get rid of the for look so the function runs without loops. Thank you.
Best Answer