# Highest frequency of collected force signal [closed]

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?

## closed as off-topic by A_A, lennon310, Peter K.♦Jan 2 '18 at 1:20

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.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Can you please modify the question so that it does not appear to be requesting code written to specification? (i.e., "show me how to do [blah] in [some platform]". What you are looking for has nothing to do with MATLAB, it's a DSP concept. – A_A Dec 28 '17 at 9:35

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.

• Thank you very much for your answer and code, I did as per you suggestion and also performed a PSD analysis on my 1500 Hz data and both suggest that the energy mostly around are not over 20 Hz so my data should be fine. When I did your code I however got the signals "mirrored" at the beginning and end of the graph. Don't know why? – Matilda Dec 29 '17 at 17:08
• Ok glad I could help! Yes they are mirrored about the middle, this is a property of the Fourier transforms; The Fourier transform of a real signal is conjugate symmetric, and this symmetry manifests itself as a mirror in the middle of the DFT analysis of your signal. Btw, I have used an x-scale of 0-Fs to reflect the relation of sampling and signal frequencies. – Fat32 Dec 29 '17 at 18:05