summaryrefslogtreecommitdiff
path: root/1523/CH4/EX4.15/ex4_15.sce
blob: 82e36138f2d5c5c91f10000f2d6dd527ea187a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
//AC Circuits : example 4.15 :pg(4.11 & 4.12)
v1=0;
v2=10;
v3=20;
t=3;
Vavg=((v1+v2+v3)/t);
Vrms=(sqrt((v1^2+v2^2+v3^2)/t));
disp("Vavg=((0+10+20)/3)");
printf("Vavg=%.f V",Vavg);
disp("Vrms=(((0)^2+(10)^2+(20)^2)/3)");
printf("Vrms=%.1f V",Vrms);