summaryrefslogtreecommitdiff
path: root/1430/CH1/EX1.5/exa1_5.sce
blob: b87f41402a46b17502af25596adb1b576b04cc1e (plain)
1
2
3
4
5
6
7
8
9
// Example 1.5
// Voltage and Power Calculation
i=4*10^-3; // Value of Current source
R=5*10^3;// Value of series resistor
// from ohm's law
v=R*i; // Voltage across the Resistor
p=v*i;// Power dissipated by the resistor
disp(v,"Voltage across the resistor(in Volts)=")
disp(p,"Power dissipated by the resistor(in Watt)=")