This circuit follows an incoming voltage signal and stores the maximum voltage in C1. Press S1 to discharge C1 and reset circuit. Connect a voltmeter from output to ground to measure the peak voltage stored in C1. The circuit functions like this:
Note how the output follows the preceding high (peak) input. Also note that the charge on C1 will gradually leak away. C1 in the test circuit fell 10millivolts/second.