blob: 5ed0fff9cd4592fe99d0fbbe6d5b9d2795937450 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clear
//
//the currents are obtained by solving the eqns
i1=5.87
i2=-0.13
i3=-1.54
v=18-1.54*8
printf("\n voltage at node D= %0.1f v",v)
i=5.86/(4)
printf("\n current in 4 ohm resistor is= %0.1f A",i)
power=18*1.54
printf("\n power supplied by 18V source is= %0.1f W",power)
|