blob: d9a8b0afdd6ea83b5026a82efe1b73fe85917aae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
clear
//Given
L=500*10**-3
I1=20*10**-3 //A
I2=10*10**-3 //A
//Calculation
U1=0.5*L*I1**2
U2=0.5*L*I2**2
//Result
printf("\n Magnetic energy stored in the coil is %0.3f *10**-4 J",U1*10**6)
printf("\n New value of energy is %0.3f J",U2)
|