summaryrefslogtreecommitdiff
path: root/3630/CH2/EX2.2/Ex2_2.sce
blob: 5ff55a7f1afbd905c87f9478cdfaa67b48437872 (plain)
1
2
3
4
5
6
7
8
9
10
clc;
//ex2.2
VD1=0; //Volt//diode is forward bias for ideal diode total Rideal=0 so VD1=IT*Rideal=0V
R1=1000; //kilo ohm;
VS=5; //Volt //voltage across voltage source
IT=(VS/R1)-(VD1/R1);//Ampere;apply kvl in the circuit
VR1=IT*R1; //Volt//apply ohms law voltage across resistance
disp( 'Volt',VD1*1,"VD1=");
disp( 'mAmpere',IT*1000,"IT=");
disp( 'Volt',VR1*1,"VR1=");