How to solve symbolic function
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Torsten
on 7 May 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 Comments
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
