Samples the continues input signal with a sampling rate defined via parameter samplePeriod. The input and output are vectors.