blob: c6384b66a101a2702e7e40e9dee9c2ec907ba296 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clear
//
//Initialization
l=10**-2 //Inductance in henry
i=5 //current in ampere
//Calculation
s=0.5*l*i**2 //stored energy
//Results
printf("\n Stored Energy = %d mJ",s*10**3)
|