Wrong solution using solve with a logarithmic
Ältere Kommentare anzeigen
Hello,
I wanted to solve an equation containing a log function. The solution given by Matlab is not correct, until I multiply the logarithm by 10.
I'm aware of the difference between log and log10 and want to use the natural logarithm.
f_1 = 10* (eta_p/(b_pstern * g * eps_min))*(log(W_0/(W_0-B1)))== s*1000 ;
W_K_1 = double(solve(f_1, B1))
In the equation, everything is numeric except for B1. When I type the exact same equation into my calculator, I get the correct answer. The "10*" is the correction factor I use for the "correct" solution.
Am I using the log function wrong or is there some other error?
2 Kommentare
dpb
am 24 Jun. 2021
Would have to have a complete test case including constants to do any diagnositics...
Matthew Worker
am 25 Jun. 2021
Bearbeitet: N/A
am 25 Jun. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

