fftfrequencynyquist

Getting correct sampling frequency, how to?


I am trying to fully understand the sampling frequency concept. I got a useful answer from PaxRomana99 (I need help setting up the correct frequency vector) and it seems like the way to get the correct frequency vector is when you set up the time interval to be related to fs:

t = 0:1/fs:10; % 10 seconds of data sampled at fs y = sin(2*pi*100.*t); However, in my case, I have no control on how my time interval is set up, I am given 2 arrays, one is the time interval and one is the sinusoidal wave resulting from that time interval. So should I got through the time array and extract fs? which should be the spacing between the time steps? am I in the wrong path here? Thanks for any hints and any help!


Solution

  • Yes, as you suggest, you get the sampling frequency from the time array. It's just 1/(time sample interval).