How to solve symbolic function
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to solve t:
eq=(ap^2*t^3)/2 - ap*t^3 + (ap*t^2)/2 - t^3/2 + t^2/2 + (127*t)/8 - 8
assume(1>ap>0)
sol=solve(eq==0,t,"ReturnConditions",true)
But I got this result:
[root(4*ap^2*z^3 - 8*ap*z^3 - 4*z^3 + 4*ap*z^2 + 4*z^2 + 127*z - 64, z, 1); root(4*ap^2*z^3 - 8*ap*z^3 - 4*z^3 + 4*ap*z^2 + 4*z^2 + 127*z - 64, z, 2); root(4*ap^2*z^3 - 8*ap*z^3 - 4*z^3 + 4*ap*z^2 + 4*z^2 + 127*z - 64, z, 3)]
ans =
Empty sym: 1-by-0
I want to get the result like t(ap)=...
Could you please give me some teaching to help me to solve this problem? Thanks a lot.
0 commentaires
Réponses (1)
Torsten
le 7 Mai 2023
syms t ap
eq=(ap^2*t^3)/2 - ap*t^3 + (ap*t^2)/2 - t^3/2 + t^2/2 + (127*t)/8 - 8
sol=solve(eq==0,'ReturnConditions',true,'MaxDegree',3)
sol.t
sol.conditions
0 commentaires
Voir également
Catégories
En savoir plus sur Assumptions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

