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!