Answer format for solve()
显示 更早的评论
I don't like the way MuPad inserts an extra parameter in the solution to a problem I gave it:
solve( { v1 + v2*t + v3*t^2 = 0,
v1*-2 + v2*(-2*t+1) + v3*(-2*t^2 + 2*t) = 0,
v1*4 + v2*(4*t-4) + v3*(4*t^2 - 8*t + 2)=12 } )
Answer: {[t = -z/12, v1 = z^2/24, v2 = z, v3 = 6]}
So I have 2 questions here:
- How do you stop mupad from using a parameter, or remove z from the equations and have the solution in t only?
- If you square z in the solution for v1, you lose the negativity, so isn't this answer strictly speaking not correct? (Since v1 = 6*t^2, not -6*t^2 as it should be?)
采纳的回答
更多回答(1 个)
Andrew Newell
2011-6-2
1. Just specify the variables:
solve(...,{v1,v2,v3})
2. In your solution, if you substitute for all four variables, the equation is zero.
类别
在 帮助中心 和 File Exchange 中查找有关 Evaluation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!