我正在自学Matlab,我想创建一个电子浓度和反温度图,如图所示:
我在 matlab 中创建了一个代码,但我没有在图中看到该线。为什么?
% Constants
k = 1.38e-23; % Boltzmann's constant (J/K)
Eg = 1.12; % Energy band gap of silicon (eV)
A = 2.5e19; % Constant for intrinsic carrier concentration calculation
Nc = 2.8e19; % Effective density of states in conduction band (cm^-3)
Nd = 1e16; % Doping concentration (cm^-3)
% Temperature range
T = linspace(100, 1000, 100); % Temperature range from 100 K to 1000 K
% Electron concentration for n-type doping
n = (Nc * Nv)^0.5 * exp(-Eg./(2*k*T));
% Calculate ln(n)
ln_n = log(n);
% Calculate 1/T
inv_T = 1 ./ T;
% Plot
plot(inv_T, ln_n, 'r', 'LineWidth', 2);
xlabel('1/T');
ylabel('ln(N_D)');
title('ln(Electron Concentration) vs. 1/T for Silicon');
grid on;
有人知道吗?
您可以按如下方式绘制它:
k = 1.38e-23; % Boltzmann's constant (J/K)
k = 8.6173303e-5; % Boltzmann's constant (eV/K)
Eg = 1.12; % Energy band gap of silicon (eV)
A = 2.5e19; % Constant for intrinsic carrier concentration calculation
Nc = 2.8e19; % Effective density of states in conduction band (cm^-3)
Nd = 1e16; % Doping concentration (cm^-3)
% Temperature range
T = linspace(100, 1000, 100); % Temperature range from 100 K to 1000 K
% Electron concentration for n-type doping
n = (Nc * Nd)^0.5 * exp(-Eg./(2*k*T));
% Calculate ln(n)
ln_n = log(n);
% Calculate 1/T
inv_T = 1 ./ T;
% Plot
plot(inv_T, ln_n, 'r', 'LineWidth', 2);
xlabel('1/T');
ylabel('ln(N_D)');
title('ln(Electron Concentration) vs. 1/T for Silicon');
grid on;
您的图没有显示,因为该值太小,即零。您需要以
k
为单位使用eV
。您还需要将 Nv
替换为 Nd
。附件是改变这两项之后的固有斜率图。