blob: eef8ad7d168c5ef81968c0df3cf3dfdcb9464f7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//Chapter 16, Example 16.4
clc
//Initialisation
i=0.2 //current in ampere
c=0.01 //capacitance in farad
t=20*10**-3 //time in sec
//Calculation
dv=i/c //change in voltage w.r.t time
vc=t*dv //peak ripple voltage on capacitor
//Results
printf("Peak Ripple Voltage = %.1f V",vc)
|