Matlab solver for natural log equation
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 20 Nov. 2020
Bearbeitet: Walter Roberson
am 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
Kategorien
Mehr zu General Applications finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




