How to solve this equations using matlab code,I use solve but I have obtained a wrong and strange solution, and I don't know why.
조회 수: 29 (최근 30일)
이전 댓글 표시
% 定义符号变量
syms Q t
% 第一个方程
eqn1 = 19/Q + 1/(2*50*10^(-6)) - 5/(24*t^2);
% 第二个方程
eqn2 = (5 + 0.5*(Q/(50*10^(-6))))*(Q - 7.02*10^(-6)) - (24 + Q/(50*10^(-6)))*t;
% 求解方程组
[solQ, solt] = solve([eqn1, eqn2], [Q, t]);
댓글 수: 0
채택된 답변
Star Strider
2024년 11월 13일 3:23
It would help to have your code.
Qvpa = vpa(s.Q)
That should produce numerical values for your system of degre polynomials.
Qd = double(Qvpa)
if you want values to use in other parts of your script.
.
댓글 수: 0
추가 답변 (1개)
Walter Roberson
2024년 11월 13일 3:47
eqn1 = 19/Q + 1/(2*50*10^(-6)) - 5/(24*t^2);
solving for Q involves t^2
eqn2 = (5 + 0.5*(Q/(50*10^(-6))))*(Q - 7.02*10^(-6)) - (24 + Q/(50*10^(-6)))*t;
There is Q times Q and Q times t. Because the solution for Q involves t^2, you can be sure that eqn2 involves at least (t^2)*2 --> t^4. In fact, the expression for eqn2 turns out to involve t^5 in the numerator.
So you end up working with a polynomial of degree 5. The root(z^5 + etc) is the Symbolic Engine's way of representing solutions of polynomials.
In mathematics, the Abel–Ruffini theorem (also known as Abel's impossibility theorem) states that there is no solution in radicals to general polynomial equations of degree five or higher with arbitrary coefficients.
With there being no explicit solutions to the roots of the polynomial of degree 5, the Symbolic Engine introduces placeholders for the roots.
You can vpa() to get numeric approximations for the roots.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!