salut a tous,
j aimerai reecrire le language ci dessous en Matlab
si quelqu´un si connait ,merci d avance.
bon dimance a tous
Jourdain
Code:eps0<-8.854E-14 #F/cm epsOx<-3.9 # epsHL<-11.8 q<-1.602E-19 #C dox<-1E-4 #cm 1um=1E-4 Cox<-eps0*epsHL/dox Na<-3E13 #1/cm³ ni<-1.08E10 #1/cm³ k<-1.38E-23 #J/K T<-300 #K PhiB<-k*T/q*log(Na/ni) UFB<- -1 QHLmax<--sqrt(2*eps0*epsHL*q*Na*2*PhiB) Uth<-UFB+2*PhiB-QHLmax/Cox CHLmin<-sqrt(q*eps0*epsHL*Na/(2*PhiB)) f.PhiS<-function(UG){ B<--(2*UG*Cox^2+2*eps0*epsHL*q*Na) A<-Cox^2 C<-Cox^2*UG^2 PhiS<- (-B-sqrt(B^2-4*A*C))/(2*A) PhiS } f.C<-function(UGs){ Cs<-c() for(UG in UGs){ if(UG<UFB){C<-Cox} if(UG>UFB & UG<Uth){ CHL<-sqrt(2*q*eps0*epsHL*Na/(2*f.PhiS(UG-UFB))) C<-Cox*CHL/(Cox+CHL)} if(UG>Uth){C<-Cox*CHLmin/(Cox+CHLmin)} Cs<-rbind(Cs,C) } Cs } UGs<-seq(-2,2,by=0.01) Css<-f.C(UGs) plot(UGs,Css,xlab="Tension d entree",ylab="Capacitet",main="C-V-Courbe",type="l")
-----