summaryrefslogtreecommitdiff
path: root/3769/CH12/EX12.20/Ex12_20.sce
blob: 4ddab89eb09996a0e0dbb8092db3e0e9bd5cdf5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clear
//Given
E=12
R=30.0                    //ohm
L=0.22 

//Calculation
I0=E/R
I=I0/2.0
P=E*I
dl=(E-(I*R))/L
du=L*I*dl

//Result
printf("\n (i) Energy being delivered by the battery is %0.3f  W", P)
printf("\n (ii) ENergy being stored in the magnetic field of inductor is %0.3f  W",du)