summaryrefslogtreecommitdiff
path: root/3673/CH1/EX1.a.5/Example_a_1_5.sce
blob: 09f9204f6d16aa6a25239a8dc80be04112d9e48e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Example 1_5 page no:23
clc;
//applying kirchoff law
V=-20*10^-3/(-4.25*10^-3);
P3=66.55;
P20=-20*V;
P4=V*V/(4);
P=V*V/1;
disp(P3,"the power absorbed by 3i current source is (in mW)");
disp(P20,"the power absorbed by 20mA current source is (in mW)");
disp(P4,"the power absorbed by 4 kilo ohm current source is (in mW)");
disp(P,"the power absorbed by 1 kilo ohm current source is (in mW)");
//in text book V value is rounded off but here the value is not rounded and used directly
//so power result varies slightly
//in text book V is rounded to 4.71 V