how to solve these equations

1 回表示 (過去 30 日間)
asaf omer
asaf omer 2019 年 7 月 11 日
回答済み: Star Strider 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 Center および File ExchangeMathematics についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by