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
4 views (last 30 days)
Show older comments
% 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);
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);
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']);
disp(['Maximum Drain Current (Variation 2): ', num2str(max(ID2)), ' mA']);
0 Comments
Answers (1)
Torsten
on 29 May 2023
Moved: Torsten
on 29 May 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);
0 Comments
See Also
Categories
Find more on Hydraulics and Pneumatics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
