File size: 184 Bytes
1ba1a16
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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