1 2 3 4 5 6 7
//Example 1_6 page no:8 clc clear C=2*(10^-6);//capacitance in micro farad V=1000;//Voltage in volts W=0.5*(C)*(V^2); disp(W,"Energy stored(in joules)")