summaryrefslogtreecommitdiff
path: root/3809/CH5/EX5.6/EX5_6.sce
blob: bd9880b74cdc1fc544d173ad43afad3a6ded6191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Chapter 5, Example 5.6

clc
//Initialisation'
L=10**-2                   //inductance
I=5                         //current in ampere


//Calculation
e=(1/2)*L*I**2               //stored energy

//Results
printf("Stored Energy = %d mJ",e*10**3)