Need to solve the non linear equation below using Matlab

I need to solve the above equation and find the values of EF for the value of Na will be varied from 10^13 to 10^19. Similarly the value of Nd will be varied from 10^13 to 10^19. The values of all other quantities are constant. How do I do this????
I need to plot a 3d graph with x y z as Na Nd EF after finding values of EF.
A = NC * exp(-(EC-EF)/kbT) + (Na(i)) / ( 1+ 4* exp(-(EF-EA)/kbT)) == NV * exp(-(EV)/kbT) + (Nd(j)) / ( 1+ 2* exp(EF)/kbT);

2 Comments

Rik
Rik on 24 Feb 2022
Edited: Rik on 24 Feb 2022
I recovered the removed content from the Google cache (something which anyone can do). Editing away your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.
Archive of the current state of the page here.
Why did you edit your question again? Why is this version more useful for future readers than the original?
If you don't respond, I'll put back the archived version.

Sign in to comment.

Answers (1)

Na = ...;
Nd = ...;
NC = ...;
EC = ...;
kbT = ...;
EA = ...;
NV = ...;
EV = ...;
ED = ...;
EF = zeros(numel(Na),numel(Nd));
for i=1:numel(Na)
for j=1:numel(Nd)
fun = @(EF) NC * exp(-(EC-EF)/kbT) + (Na(i)) / ( 1+ 4* exp(-(EF-EA)/kbT)) - (NV * exp(-(EF-EV)/kbT) + (Nd(j)) / ( 1+ 2* exp(-(ED-EF)/kbT)));
EF0 = ...;
EF(i,j) = fzero(fun,EF0);
% or EF(i,j) = fsolve(fun,EF0);
end
end

2 Comments

Na = linspace(1e13,1e19,100);
Nd = linspace(1e13,1e19,100);
[NA, ND] = meshgrid(Na,Nd);
NC = ...;
EC = ...;
kbT = ...;
EA = ...;
NV = ...;
EV = ...;
ED = ...;
EF = zeros(numel(Na),numel(Nd));
for i=1:numel(Na)
for j=1:numel(Nd)
fun = @(EF) NC * exp(-(EC-EF)/kbT) + (NA(i,j)) / ( 1+ 4* exp(-(EF-EA)/kbT)) - (NV * exp(-(EF-EV)/kbT) + (ND(i,j)) / ( 1+ 2* exp(-(ED-EF)/kbT)));
EF0 = ...;
EF(i,j) = fzero(fun,EF0);
% or EF(i,j) = fsolve(fun,EF0);
end
end
surf(NA,ND,EF)
Deleted comment by @Neha Sinha:
Thank you for the reply
How do I put the value of Na ? The value would be in this range 10^13 to 10^19. I have to find all values of EF for different values of Na and Nd in the mentioned range and then plot a 3d graph between Na, Nd and EF as x y z axis

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Asked:

KN
on 20 Feb 2022

Commented:

Rik
on 26 Feb 2022

Community Treasure Hunt

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

Start Hunting!