How can i solve this equation with solve()
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jean Volkmar
le 10 Oct 2023
Commenté : Jean Volkmar
le 10 Oct 2023
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 commentaires
Réponse acceptée
Florian Bidaud
le 10 Oct 2023
Modifié(e) : Florian Bidaud
le 10 Oct 2023
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)
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!