clcfor i=-5:1:20 if i>=9 y(i)=10*sqrt(2*i)+5; elseif (0<i)&&(i<=9) y(i)=5*i+5; else y(i)=5; end endplot(y,'-b*');axis([-5 25 0 80]);
in the above script i like to plot y for all i values but it is showing error that the index must be positive for -5 to 0.
Best Answer