function y = f(x) y=zeros(size(x)); idx = find(x>0 & x<3); y(idx) = 2*x(idx)/3; idx = find(x==3); y(idx)=1;
Published with MATLAB® 7.6