Basic Sampling Question
First a minor correction Nyquist Theorem say that the sampling frequency should be a bit higher than twice the signal to recover, this small off-set will assure that eventually you will hit peaks and valleys and you will recover frequency and amplitude of signal.
With 2 or 4 samples the chances to measure a signal accurately are low, maybe the frequency will be measured but not the amplitude, it's more likely you will sample the signal between peaks and valley.
But if you take 64k samples a minor difference between sampling frequency and twice the sampled signal will assure you hit peaks and valleys, but it depends on how many samples can you take before making the processing.
The next PDF is much better than me explaining this http://www.wescottdesign.com/articles/Sampling/sampling.pdf
Happy codding =)
I am new to DSP area and have a basic question about the Nyquist Theorem. Basically to sample a sine wave, for example, I need to sample at twice the frequency of the signal. It has occurred to me that there is the possibility of sampling at the peaks and valleys; but, there is also the possibility that the sampling could occur at the zero-crossings. In this latter case, every sample would be zero. Obviously this is not desired. How does one ensure that this will not happen?