I have collected force at the footrest during paddling at two occasions. During one occasion I accidently collected the force signals at 150 Hz instead of 1500 Hz. During the other time the data was collected at 1500 Hz. I now want to calculate the highest frequency of the signal collected at 1500 Hz to be able to know if the data collected at 150 Hz is within the Nyquist criterion. How do I calculate the highest frequency in my signal?
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions requesting working code written to a specification are off-topic as they are unlikely to benefit anyone else. Instead, describe the problem you're solving and where you're stuck." – A_A, lennon310, Peter K.
In order to determine the spectral content of your signal you can compute and display its Fourier transform. Assuming you have $N$ samples of the signal $x[n]$ sampled at $F_s = 1500$ Hz, then you can simply determine its frequency content by the following Matlab command:
Xk = fft(x ,N);
Then you can plot its spectrum to see if there is significand energy in the frequency region above $150/2 = 75$ Hz by the following code:
figure, plot ( linspace(0,Fs,N) , abs(Xk) ) ; xlabel('Frequency [Hz]') title('DFT Spectrum Magnitude |X[k]| of x[n]');
If there is any signifcand energy above $75$ Hz then there will be significand aliasing. However note that the sensor might have applied a $75$ Hz lowpass filter before sampling the signal, so that you can still avoid alising, but your signal will be distorted, nevertheless, as it would have beeen sampled from a lowpass filtered version of the true signal.