summaryrefslogtreecommitdiff
path: root/181/CH7/EX7.36/example7_36.sce
blob: fe84a14c3c9033e3b73fdf79f7ccddf54aa626aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Equation for drain current
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 7-36 in page 340

clear; clc; close;

// Given
Idss=12; // Drain source current in mA
Vgs=-5; // Gate source voltage in V when off

// Calculation
printf("Equation for drain current:Id = %0.0f*(1-(Vgs/%0.0f))^2",Idss,Vgs);
x=[-5 -4 -3 -2 -1 0];
y=[12 11 10 9 8 7 6 5 4 3 2 1 0];
y=12*(1+(x/5))^2;
plot(x,y);
xlabel('Vgs');
ylabel('Id');
title('Transfer characteristics of FET');

// Result
// Graph shows the transfer characteristics of FET for the given values
// Set axis properties to 'origin' to view graph correctly