Electron concentration as a function of quasi fermi level
Show older comments
Hi I want to plot electron and hole concentration as a function of quasi fermi level.
Electron (n) and hole (p) concentration are

and I want to plot them as function of

n as function of Efn and p as function of Efp and resulting graph should look like

How can i make this plot in matlab. I will require some detail answer as i am newbie to matlab. Thanks
Answers (3)
Roger Stafford
on 6 Mar 2014
Edited: Roger Stafford
on 6 Mar 2014
0 votes
It is possible you could have trouble numerically evaluating those integrals as x (and y) approach infinity. The integrand, x^(1/2)/(1+exp(x-x0)), will approach infinity-divided-by-infinity and could produce a NaN in matlab. If so, you might find it useful to make a change of variable. Let z = x^(3/2) so that x^(1/2)*dx = 2/3*dz which will eliminate the infinity in the numerator. Of course, make the corresponding change in 1+exp(x-x0) to 1+exp(z^(2/3)-x0).
By the way, what are you varying to make Efn and n change? Is it x0?
Muhammad Rehan
on 6 Mar 2014
0 votes
Muhammad Rehan
on 6 Mar 2014
2 Comments
Roger Stafford
on 6 Mar 2014
I made that suggestion assuming you would use one of matlab's numerical quadrature functions to evaluate the integral you have given here. However, I see no resemblance to a valid evaluation of this integral in your code as you produce 'n'. For example, note that for negative values of ii, the quantity ii.^1.5 becomes complex-valued.
Your error message is due to using fractional values for ii as indices into n and x0. That is not the way to store values in an array. You should read up on indexing in arrays.
However, far more fundamental is getting those two integrals correctly evaluated for each different value of x0 that you are interested in.
Muhammad Rehan
on 6 Mar 2014
Categories
Find more on Particle & Nuclear Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!