
How to plot a variable in MATLAB which can not be separated explicitly ?
조회 수: 4 (최근 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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!