how to solve these equations

1 次查看(过去 30 天)
asaf omer
asaf omer 2019-7-11
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?

回答(2 个)

Stephan
Stephan 2019-7-11
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 2019-7-11
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.

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by