Solve Logrithm Equation with multiple solutions

I am trying to solve an equation using:
solve('(1.581/1.5)=x*log(58/x)')
ans =
56.936183721096301740573270965739
However, there is another solution 0.183, which matlab does not give me and that happen to be the solution I need. How to solve it? Thanks!

 採用された回答

Matt Fig
Matt Fig 2012 年 9 月 14 日

2 投票

Just use numerical methods:
f = @(x)(1.581/1.5)-x.*log(58./x);
rt = fzero(f,.2)

2 件のコメント

Matt Fig
Matt Fig 2012 年 9 月 14 日
Carol comments,
"Thanks Matt, so the trick is for discontinuous function, you got to define the range for its solution?"
Matt Fig
Matt Fig 2012 年 9 月 14 日
When using FZERO you have to supply an initial guess or a bracket. See the help for more information.
help fzero

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProblem-Based Optimization Setup についてさらに検索

タグ

質問済み:

2012 年 9 月 14 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by