Invalid expression. Check for missing multiplication operator, missing or

1 Ansicht (letzte 30 Tage)
clear all
close all
clc
%Constants
q=l.6e-19;
k=8.625e-5;
e0=8.854e-14;
%Device, Material, and System Parameters
ni=l.5e10;
esi=ll.8;
T=300;
a=l.5e-4;
z=50e-4;
L=5e-4;
ND=2el5;
VG=[0 -.5 -1 -1.5 -2];
%Contact Potential
V0=.55+k*T*log(ND/ni);
%mobility calculation
NDref=1.3el7;
mu_n_min=92;
mu_n_0=1268;
alpha_n=0.91;
mun=mu_n_min+mu_n_0./(1+(ND/NDref).^alpha_n)
%Resistivity
sigma=q*ND*mun;
rho=l/sigma;
%Mutual Transconductance
G0=2*a*z/(rho*L)
%Pinch—off voltage
VP=V0-q*a^2*ND/(2*e0*esi)
% Calculate ID as a function of VD
VD=linspace(0,abs(VP)+5,100);
for j=1:1:length(VG)
for i=1:1:length(VD)
if VD(i)<(VG(j)-VP) %Linear regime
ID(j,i)=G0*(VD(i)-2/3*(V0-VP)*(((VD(i)+V0-VG(j))/(V0-VP)).^(3/2)-((V0-VG(j))/(V0-VP)).^(3/2)));
else
VD(i)=VG(j)-VP;
ID(j,i)=G0*(VD(i)-2/3*(V0-VP)*(1-((V0-VG(j))/(V0-VP)).^(3/2)));
end
end
end
VD=linspace(0,abs(VP)+5,100); %Voltage vector re—generation for plotting
plot(VD,ID*le6)
hold on
xlabel ('VD (Volts)')
ylabel ('ID (Microampere) ')
title('JFET I—V Characteristics')
grid
%Code ends

Antworten (2)

Image Analyst
Image Analyst am 19 Jul. 2021
It doesn't like your decimal point. What is it? If I copy and paste your number into the command window, it complains about the decimal point but if I type it in myself directly, it works fine. Maybe you used some sort of higher order unicode decimal point.

Walter Roberson
Walter Roberson am 20 Jul. 2021
q=l.6e-19;
The decimal point is fine, but that is a lower-case L, not a one, before the decimal point.

Kategorien

Mehr zu Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by