Can anyone please help me in correcting the code for ns vs thickness AlN
조회 수: 1 (최근 30일)
이전 댓글 표시
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')
댓글 수: 4
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!