1 2 3 4 5 6
l=1; r=1000; v=10; i=v/r; w=0.5*l*i^2; disp("energy stored (in μJ) in the coil is"); disp(w*10^6);