Need help with correcting the code below

10 次查看(过去 30 天)
Hello,
I am trying to plot this curve but failing to do so. I want to plot Vth as a function of shiM (3.5:0.25:5.5)
But maybe I am not using my for loop correctly. Could anyone please have a look? I really need help. Here is the code:
clc;
mo= 9.11e-31;
mn= 1.1*mo
mh=0.5*mo
k=1.3e-23;
T=300;
Eg=1.166*1.6e-19 %%Eg=1.166ev
h=6.63e-34
q= 1.6e-19;
alpha= 0.000473*q
B=636;
Na= 1e21; %%unit in meter cube,,, we have to change it for (b)
X=4.1*q %%%electron affinity value in eV CHECK
tox= 0.6e-9; %%in meter .. i took tox=0.6nm
eps0 = 8.85e-12;
Kox = 3.95; %%%oxide dielectric constant
Ks = 11.7;%%%semiconductor dielectric constant
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Nv= 2*((2*3.142*mh*k*T)/h^2)^1.5
Nc= 2*((2*3.142*mn*k*T)/h^2)^1.5
ni=sqrt(Nc*Nv)*exp((-Eg)/(2*k*T))
Egt= Eg- ((alpha*(T^2))/(B+T))
shiF= k*T* log(Na/ni) %%%joules
shiS= abs(X+ (Eg/2)+ shiF) %%joule
Cox= (Kox * eps0)/tox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i=1;
for shiM=3.5*q:0.25*q:5.5*q %%%assumed
shiMS(i)= abs(shiM - shiS) %%joule
%%now calculatetion of Vth
Vth= abs(shiM - shiS)+ (2*shiF) + sqrt(4*q*Ks*eps0*Na*shiF)/Cox %%unit in volts
i=i+1;
end
shiM=3.5*q:0.25*q:5.5*q
plot(shiM, Vth, '-*r')
title('Threshold voltage vs given parameter curve'), xlabel('phiM'), ylabel('Threshold voltage')

采纳的回答

Walter Roberson
Walter Roberson 2017-10-8
Change
Vth= abs(shiM - shiS)+ (2*shiF) + sqrt(4*q*Ks*eps0*Na*shiF)/Cox %%unit in volts
to
Vth(i) = abs(shiM - shiS)+ (2*shiF) + sqrt(4*q*Ks*eps0*Na*shiF)/Cox %%unit in volts

更多回答(1 个)

Rizbi
Rizbi 2017-10-8
Yes I did but the result looks like this attached. maybe there is still some problem. COuld you please help me?
  2 个评论
Walter Roberson
Walter Roberson 2017-10-8
Yes, that is what your formula leads to. For the K'th entry, your formula gives approximately
abs(4.0e-20*K - 2.851588058088316e-19) + 0.000000000001044453337529677

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Semiconductors and Converters 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by