How can i get the same solution as mupad with symbolic math?

조회 수: 9 (최근 30일)
hyunsuk Lee
hyunsuk Lee 2014년 12월 19일
댓글: hyunsuk Lee 2014년 12월 19일
I tried to solve simulataneous equations I suceed to get solution with mupad. However i failed to get the solution with symbloic math
i attached the source code. How can i get the correct result with symbloic math?
R1=[2.200 1.8250 1.5250];
R2=[1.1000 0.9750 0.800];
R3=[0.5 0.35 0.25];
pR1=[2.0 1.5 1.7];
pR2=[1.0 1.0 0.3];
pR3=[1.0 1.0 0.5];
x=sym('x','real');
y=sym('y','real');
[solx, soly, params, conditions] = solve((R1(1) + x*R1(2) + y*R1(3)) / (pR1(1) + x*pR1(2) + y*pR1(3)) == (R2(1) + x*R2(2) + y*R2(3)) / (pR2(1) + x*pR2(2) + y*pR2(3)) ,(R1(1) + x*R1(2) + y*R1(3)) / (pR1(1) + x*pR1(2) + y*pR1(3)) == (R3(1) + x*R3(2) + y*R3(3)) / (pR3(1) + x*pR3(2) + y*pR3(3)),[x,y],'ReturnConditions',true);

채택된 답변

Mischa Kim
Mischa Kim 2014년 12월 19일
Hyunsuk, what is the correct result?
When I run your code I get
solx_n = vpa(solx)
solx_n =
-0.83057115678937513937111579526602
-0.69106286794056044132960951267269
-4.1017862817480576543720080358332
soly_n = vpa(soly)
soly_n =
-0.44526685001579194788840336984639
-0.22265558764897935824992374783178
3.516420891692129079484966442921
  댓글 수: 1
hyunsuk Lee
hyunsuk Lee 2014년 12월 19일
Thank you very much! I didn't know i have to use vpa. Again, thanks alot

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

추가 답변 (1개)

hyunsuk Lee
hyunsuk Lee 2014년 12월 19일
Thank you very much! I didn't know i have to use vpa. Again, thanks alot

카테고리

Help CenterFile Exchange에서 Get Started with MuPAD에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by