Matlab solver for natural log equation
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 20 de Nov. de 2020
Editada: Walter Roberson
el 20 de Nov. de 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
Categorías
Más información sobre Assumptions en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




