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]);

採用された回答

Star Strider
Star Strider 2024 年 11 月 13 日 3:23
It would help to have your code.
See if using the vpa function will produce a moree understandable reesult, specifically:
Qvpa = vpa(s.Q)
That should produce numerical values for your system of degre polynomials.
You can use double on that result:
Qd = double(Qvpa)
if you want values to use in other parts of your script.
.

その他の回答 (1 件)

Walter Roberson
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.

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by