rippleOfCapPP(cap, freq, load)

import electronics.rlc.capRipple-1

Calculates the peak-to-peak ripple voltage of a supply capacitor.

import electronics.rlc.capRipple-1;
rippleOfCapPP( 1000uF, 100Hz, 100mA )
capthe size of the capacitor
freqcharge frequency. For example in case of full wave rectification of mains supply it's 100/120Hz, in half wave 50/60Hz.
loadload current. Because usually the ripple is small, a constant current load can be assumed even in case of resistive load.
return valuethe peak-to-peak voltage ripple.