1 2 3 4 5 6 7 8 9 10 11
// To Calculate the average voltage. clc; clear; W=500; I=40; t=15*(10^-3); V=W/(I*t); disp('volts',V,'The Average volatage across the terminals of the device =')