solving three equations for 3 unknows

조회 수: 1 (최근 30일)
Valerie Cala
Valerie Cala 2019년 6월 10일
댓글: Star Strider 2019년 6월 10일
Hi Guys, I have the three following equations:
(2*c*w1)+b2 == 0.3205;
((2*c*b2)+ w1)*w1 == 214200;
(b2*w1)==1.2260e+05;
And I need to find the values of: c, w1 and b2.... is there a function for me to do it?
Thanks for your time.

채택된 답변

Star Strider
Star Strider 2019년 6월 10일
For your system, use vpasolve (link) to get numeric results. You may also need to use the double function if you want to use the results in other calculations.
syms c w1 b2
Eqs = [(2*c*w1)+b2 == 0.3205;
((2*c*b2)+ w1)*w1 == 214200;
(b2*w1)==1.2260e+05];
[c,w1,b2] = vpasolve(Eqs, [c,w1,b2])
  댓글 수: 4
Valerie Cala
Valerie Cala 2019년 6월 10일
Thank you! everything is clear now :3
Star Strider
Star Strider 2019년 6월 10일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jon Wieser
Jon Wieser 2019년 6월 10일
try:
D=solve('(2*c*w1)+b2 = 0.3205','((2*c*b2)+ w1)*w1 = 214200','(b2*w1)=1.2260e+05;','c','w1','b2')

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by