summaryrefslogtreecommitdiff
path: root/2075/CH7/EX7.1/pe7_1.sce
blob: 6ab923ef36db816c9316da623a986f16973621ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//example 7.1
clc; funcprot(0);
// Initialization of Variable
T=20;//time
Vp=12;//voltage
t=5;
//calculation
D=t/T;
disp(D,"duty cycle:")
Vd=(D*Vp);
disp(Vd,"average voltage in V:")
clear()