MATLAB 用if语句求下列分段函数的值,有程序
MATLAB程序:clearclose allclcx=[-5,-3,1,2,2.5,3.0,5.0];y=zeros();% x=input(‘input x:’);for i=1:length(x)if x(i)<0&&x(i)~=-3y(i)=x(i)^2+x(i)-6;elseif x(i)>=0&&x(i)<=5&a...