how to solve the below equations

1 Ansicht (letzte 30 Tage)
RAJAN PRASAD
RAJAN PRASAD am 1 Jun. 2016
Beantwortet: Walter Roberson am 1 Jun. 2016
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

Antworten (1)

Walter Roberson
Walter Roberson am 1 Jun. 2016
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]);

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by