clc;clear
b=solve('a=((3-(-3))/(2-(-1)))*(b-((2-1)/2))')
a=[-3,-2,-1,0,1,2,3];
b=subs(b)
结果:
b =
1/2*a+1/2
b =
-1 -0.5 0 0.5 1 1.5 2
clc;clear
b=solve('a=((3-(-3))/(2-(-1)))*(b-((2-1)/2))')
a=[-3,-2,-1,0,1,2,3];
b=subs(b)
结果:
b=
1/2*a+1/2
b=
-1-0.500.511.52