how to solve these equations

1 Ansicht (letzte 30 Tage)
asaf omer
asaf omer am 11 Jul. 2019
Beantwortet: Star Strider am 11 Jul. 2019
hi, everyone
i wanna find a specific answer for these equations :
a^2+b*c==-1
,a*b+b*d==1,
a*c+c*d==-1,
d^2+b*c==0
which matlab function can i use to solve the equations above?
btw ,without using matlab , how can i solve it?

Antworten (2)

Stephan
Stephan am 11 Jul. 2019
for only real solutions:
syms a b c d real
eq(1) = a^2+b*c==-1;
eq(2) = a*b+b*d==1;
eq(3) = a*c+c*d==-1;
eq(4) = d^2+b*c==0;
res = solve(eq);
res_a = res.a
res_b = res.b
res_c = res.c
res_d = res.d
otherwise, if complex solutions are also needed:
syms a b c d
eq(1) = a^2+b*c==-1;
eq(2) = a*b+b*d==1;
eq(3) = a*c+c*d==-1;
eq(4) = d^2+b*c==0;
res = solve(eq);
res_a = res.a
res_b = res.b
res_c = res.c
res_d = res.d

Star Strider
Star Strider am 11 Jul. 2019
You already formatted them to work with the Symbolic Math Toolbox (unless the ‘==’ means a logical operation), so:
syms a b c d
[a,b,c,d] = solve(a^2+b*c==-1, a*b+b*d==1, a*c+c*d==-1, d^2+b*c==0, [a,b,c,d])
Without using MATLAB, use the paper and pencil approach.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by