如何用Matlab求反函数值

a=[-3,-2,-1,0,1,2,3];a=((3-(-3))/(2-(-1)))*(b-((2-1)/2));求b。多谢!
2024-11-26 15:23:32
推荐回答(2个)
回答1:

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

回答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