Can anyone please help me in correcting the code for ns vs thickness AlN
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1076130/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1076135/image.png)
I want to plot sheet charge density 'ns' vs AlN spacer thickness 'tAlN ' using eq. 9 but I am not getting correct results as I should get the plot which I have attached . Please check my code and modify it so that I can understand my mistakes. As in this eqn 'tAlN ' will vary but here used tAlN for 'detaEceff' and ns both.
clear all;
q=1.6e-19;
E0=8.85e-12;
Ealgan=10.31;
Ealn=10.78;
fib=(5.1*1.6e-19);
sigmaaln=3.38e17;
sigmaalgan=1.3e17;
detaec=(0.862*1.6e-19);
talgan=23e-9;
d0=26e-9;
p=(q^2/Ealn*E0);
taln=0:0.1:2.5;
m=length(taln);
for i=1:m
detaec2(i)=[detaec+(p*sigmaaln*taln(i))];
end
ns(i)=(sigmaaln*taln-(Ealgan*E0*fib/q)+(Ealn*E0*detaec2(i)/q^2))/(talgan+taln+d0);
plot(taln, ns)
0 个评论
采纳的回答
Abderrahim. B
2022-7-25
Hi!
Please learn how to use for loops ...
doc for
The code below plots a graph similar to the one you attached, bmaybe still need some to be reviewed.
clear;
q=1.6e-19;
E0=8.85e-12;
Ealgan=10.31;
Ealn=10.78;
fib=(5.1*1.6e-19);
sigmaaln=3.38e17;
sigmaalgan=1.3e17;
detaec=(0.862*1.6e-19);
talgan=23e-9;
d0=26e-9;
p=((q^2)/Ealn)*E0;
taln=10:10:100;
m=length(taln);
for i=1:m
detaec2 = detaec + (p*sigmaaln*taln(i));
ns(i) = ((sigmaaln*taln(i) - (Ealgan*E0)*(fib/q) + ((Ealn*E0*detaec2)/(q^2)) ))/(talgan +taln(i) +d0);
end
plot(taln, ns, 'k-o')
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!