How to solve symbolic function
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Torsten
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

