1 2 3 4 5 6 7 8 9 10 11 12
clear //Given E0=250 //V I0=10 //A //Calculation P=E0*I0 P1=P/2.0 //Result printf("\n (i) Peak power is %0.3f W", P) printf("\n (ii) Average power is %0.3f W",P1)