summaryrefslogtreecommitdiff
path: root/3754/CH6/EX6.5/6_5.sce
blob: 2aae3a99d430d2f0720f38d305fd29bc9d38c85f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clear//

//Variables

Vmax = 20.0            //Voltage (in milli-volts)

//Calculation

Vrms = 0.707 * Vmax    //Rms Voltage (in milli-volts)
Vdc = 0.637 * Vmax     //Average value of signal (in milli-volts)

//Result

printf("\n RMS value is  %0.3f  mV.\nAverage value is  %0.3f  mV.",Vrms,Vdc)