How to plot a variable in MATLAB which can not be separated explicitly ?

5 ビュー (過去 30 日間)
Tanveer Ahmed
Tanveer Ahmed 2019 年 5 月 11 日
編集済み: Tanveer Ahmed 2019 年 5 月 11 日
I am trying to plot this function using MATLAB:
ln(Iout./Iin)+(Iout-Iin)./Isat = 2*Alpha*L
Rest of the values are given as:
L=0:0.1:10
Iin=1
Alpha=0.1
Isat=100
But I can't separate "Iout" from rest of the equation analytically. Can someone help me plot "Iout" as a function of "L"?

採用された回答

John D'Errico
John D'Errico 2019 年 5 月 11 日
編集済み: John D'Errico 2019 年 5 月 11 日
Is ln meant to denote the NATURAL logarithm? If so, then you use log in MATLAB.
At first, I thought you mean to write lin, which is a variable in your problem. Assuming you mean log, I would just use fimplicit...
Iin = 1;
alph = 0.1;
Isat = 100;
fimplicit(@(L,Iout) log(Iout./Iin) + (Iout-Iin)./Isat - 2*alph*L,[0,10])
xlabel L
ylabel Iout
grid on
Can you solve for Iout, as a function of L? Well, yes, but not in any way you might have expected.
syms L Iout
solve(log(Iout./Iin) + (Iout-Iin)./Isat - 2*alph*L,Iout)
ans =
100*wrightOmega(L/5 - log(100) + 1/100)
If you don't know what the wrightOmega function is, or have never seen it, you will have much company in the world.
I'm reminded of the story about the famous visiting professor, who was asked to give a talk on mathematics to a group of students, many of whom were in their first year. He stood in front of the auditorium, blithely covering blackboard after blackboard with mathematics, heavy in bessel functions and beyond. After a while, he realizes how quiet the audience has become, so he turns around, and asks "Is there anyone here who has never seen a Bessel function?" At that point, several students bravely raise their hands to admit that they indeed have not. He nods, turns around, then points to the blackboard, saying "that is one there". Then he proceeds with his lecture.
  1 件のコメント
Tanveer Ahmed
Tanveer Ahmed 2019 年 5 月 11 日
編集済み: Tanveer Ahmed 2019 年 5 月 11 日
John D'Errico thanks a lot for answering the question in a very impressive way. Yes In is meant to be natural logarithm. I just forgot that log() in MATLAB is simply natural logarithm. I am attaching the pictures of problem and desired solution. You can have a look on them and guide me further in this regard.
I am a little bit unsure about the second portion of your answer because I really don't about wrightOmega function. As you said, I am quite sure I have many fellows in the world who have not seen this wrightOmega function before, exactly like me.
Thanks a lot for your time. Cheers!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by