Warning: Imaginary parts of complex X and/or Y arguments ignored. > In Finalv3test (line 19) Warning: Imaginary parts of complex X and/or Y arguments ignored. > In Finalv3t

2 Ansichten (letzte 30 Tage)
% NPN JFET Simulation
% Variation 1: Metallurgical channel thickness (a)
% Variation 2: Channel width-to-length (LW)
% Define parameters
IDSS = 10; % Saturation current (mA)
VGSoff = -4; % Gate-source cutoff voltage (V)
VP = -6; % Pinch-off voltage (V)
RD = 1000; % Drain resistance (ohm)
% Variation 1: Metallurgical channel thickness (a)
a = linspace(50, 150, 100); % Vary a from 50 Å to 150 Å
% Calculate drain current (ID) for each value of a
ID1 = IDSS * (1 - (abs(VGSoff) / VP).^sqrt(2)) .^2;
% Plot the results
figure;
plot(a, ID1, 'b', 'LineWidth', 2);
Warning: Imaginary parts of complex X and/or Y arguments ignored.
xlabel('Metallurgical Channel Thickness (Å)');
ylabel('Drain Current (mA)');
title('Change in Drain Current with Metallurgical Channel Thickness');
% Variation 2: Channel width-to-length (LW)
LW = linspace(4, 10, 100); % Vary LW from 4 to 10
% Calculate drain current (ID) for each value of LW
ID2 = IDSS * (1 - (abs(VGSoff) / VP).^sqrt(2)) .^ (2 * LW - 1);
% Plot the results
figure;
plot(LW, ID2, 'r', 'LineWidth', 2);
Warning: Imaginary parts of complex X and/or Y arguments ignored.
xlabel('Channel Width-to-Length (LW)');
ylabel('Drain Current (mA)');
title('Change in Drain Current with Channel Width-to-Length');
% Display the maximum drain current for each variation
disp(['Maximum Drain Current (Variation 1): ', num2str(max(ID1)), ' mA']);
Maximum Drain Current (Variation 1): 10.2752+12.4955i mA
disp(['Maximum Drain Current (Variation 2): ', num2str(max(ID2)), ' mA']);
Maximum Drain Current (Variation 2): -488.6218+832.583i mA

Antworten (1)

Torsten
Torsten am 29 Mai 2023
Verschoben: Torsten am 29 Mai 2023
(abs(VGSoff) / VP)
is negative, thus
(abs(VGSoff) / VP)^sqrt(2)
produces complex numbers.
Thus ID1 and ID2 are complex-valued.
Thus MATLAB cannot make the plots
plot(LW, ID1, 'r', 'LineWidth', 2);
plot(LW, ID2, 'r', 'LineWidth', 2);
Instead, it plots
plot(LW, real(ID1), 'r', 'LineWidth', 2);
plot(LW, real(ID2), 'r', 'LineWidth', 2);

Kategorien

Mehr zu Hydraulics and Pneumatics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by