how to solve the below equations

1 次查看(过去 30 天)
a = [1 2;4 5]
b=[6 7;9 8]
c=[6 5;3 4]
d=[7 4;8 0]
e=[1 5;6 7]
f=[3 2;8 9]
A=[1 5;6 7]
B=[3 2;8 9]
A=a*x+b*y
B=c*x-d*y
I want to know x and y

回答(1 个)

Walter Roberson
Walter Roberson 2016-6-1
x = sym('x%d%d', [2 2]);
y = sym('y%d%d', [2 2]);
sol = solve([A==a*x+b*y, B==c*x-d*y]);
Xsol = [sol.x11, sol.x12; sol.x21, sol.x22]);
Ysol = [sol.y11, sol.y12; sol.y21, sol.y22]);

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by