summaryrefslogtreecommitdiff
path: root/3754/CH33/EX33.2/33_2.sce
blob: 19fadaac6aacc298b763b7b094682c9817caa561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clear//

//Variables
   
Vpk = 1.0                     //Peak-to-peak voltage (in volts)
Tby2 = 0.1                    //Half-period (in seconds)
tau = 0.25                    //Time constant (in seconds)  

//Calculation

Vc = 0.5 * exp(-Tby2/tau)     //Output voltage (in volts)

//Result

printf("\n Output peak voltage is  %0.1f  V.",Vc)