Matlab solver for natural log equation
Afficher commentaires plus anciens
Hello,
I thought this was a simple solver equation, I know I am doing something wrong, because the result should be about S=1429.
This is my code:
syms x
eqn = log(0.5) == (-27109/x)-0.95*log(x)+25.18
S = vpasolve(eqn,x)
Matlab gives me a very large S =672919621689.2986708066438355574
What am I doing wrong here?
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 20 Nov 2020
Modifié(e) : Walter Roberson
le 20 Nov 2020
Q = @sym; %convert to rational
syms x
eqn = log(Q(0.5)) == (-Q(27109)/x)-Q(0.95)*log(x)+Q(25.18)
S = solve(eqn,x)
vpa(S)
You can see from this that there are two solutions. You could use an initial value in vpasolve to get the other one
Catégories
En savoir plus sur Assumptions dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




