summaryrefslogtreecommitdiff
path: root/1529/CH9/EX9.12/9_12.sce
blob: b2527488c8a08707e2e4be8785f2f96c2ea57cb5 (plain)
1
2
3
4
5
6
//Chapter 9, Problem 12
clc;
L=8;                        //inductance
I=3;                        //current in coil
W=(1/2)*L*I^2;              //calculating energy stored in inductor
printf("Energy stored = %d joules",W)