How to plot a variable in MATLAB which can not be separated explicitly ?
5 ビュー (過去 30 日間)
古いコメントを表示
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"?
0 件のコメント
採用された回答
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!