blob: 4f5a9ed1fb4d293dcea4cb1bc06e34f9b289888d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
clear//
//Variables
RC = 250.0 * 10**-12 //Time constance (in seconds)
Vomax = 50.0 //Maximum output voltage (in volts)
tau = 0.05 * 10**-6 //time (in seconds)
//Calculation
alpha = Vomax / RC //alpha (in volt per second)
Vp = alpha * tau //Peak voltage (in volts)
//Result
printf("\n The peak value of input voltage is %0.3f kV.",Vp * 10**-3)
|