Beifengdo's picture
Upload original Matlab程序设计 course files
1ba1a16 verified
Raw History Blame Contribute Delete
184 Bytes
clear
x=input('������x��ֵ')
if x<0 & X~=3
y=x.^2+x-6
elseif x>=0 & x<5 & x~=2 & x~=3
y=x.^2-5*x+6
else
y=x.^2-x-1
end
a = [-0.5,-3.0,1.0,2.0,2.5,3.0,5.0]
y = a