How can i solve this equation with solve()
1 次查看(过去 30 天)
显示 更早的评论
I want to solve this equation:
syms x
r = solve((0.02*(x-1)/(x^102 - 1))-7.59e-6,x,'ReturnConditions',true);
display(r.x)
but the r.x field does not have a solution.
syms z
z = solve((0.02*(x-1)/(x^72 - 1))-7.59e-6,x,'ReturnConditions',true);
display(double(z.x))
When i change the exponent of x, i get a solution vector as i expect. I dont understand why this happens and how i can get a solution when r.x does not result in a solution vector.
Wolframalpha solution: https://www.wolframalpha.com/input?i2d=true&i=solve%5C%2840%29Divide%5B0.02*%5C%2840%29x-1%5C%2841%29%2CPower%5Bx%2C%5C%2840%29102-1%5C%2841%29%5D%5D-7.59e-6%5C%2841%29
Thanks for any help.
0 个评论
采纳的回答
Florian Bidaud
2023-10-10
编辑:Florian Bidaud
2023-10-10
You have the explanation here : https://uk.mathworks.com/matlabcentral/answers/512646-what-is-z1-appearing-when-solving-this-nonlinear-system-for-x-y-and-z
Solution could be using vpasolve :
syms x
r = vpasolve((0.02*(x-1)/(x^102 - 1))-7.59e-6,x);
display(r)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!