summaryrefslogtreecommitdiff
path: root/3754/CH34/EX34.1/34_1.sce
blob: e8fa6cd9db8d767c4ddfe19bce95bcc5e1c4ec5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clear//

//Variables

R = 100.0 * 10**3                                //Resistance (in ohm)
C = 0.4 * 10**-6                                 //Capacitance (in Farad)
n = 0.57                                         //Ratio of peak-peak voltage to the supply voltage 

//Calculation

f = 1 / (2.3 * R * C * log10(1/(1-n)))      //Frequency (in Hertz) 

//Result

printf("\n Frequency of sweep is  %0.2f  Hz.",f)