Clear Filters
Clear Filters

finding the sampling frequency from the following

3 views (last 30 days)
Hi everyone,
I have to work out the sampling frequency. I have set up a vector of time values with 128 elements sampled at twice a second. The signal has to be calculated with five cycles in 63.5s and the code for that is:
t = 0:0.5:63.5; yt = sin(2*pi*t*5/63.5);
How do I get the sampling frequency from this information?
Thanks!

Accepted Answer

Walter Roberson
Walter Roberson on 11 Dec 2011
Sampling frequency is 1 divided by sample rate.
1 / (M seconds per sample) = ? samples per second
and samples per second is Hz .
  2 Comments
u-will-neva-no
u-will-neva-no on 11 Dec 2011
Looking at wikipedia (which may be wrong) it states that the sampling rate is the same as the sampling frequency. So my sampling rate is either 0.5 or 2...
Walter Roberson
Walter Roberson on 11 Dec 2011
Frequency is always expressed in cycles (or items) per unit time, never in units of time.
Perhaps I should have said,
"Sampling frequency is 1 divided by sample period"

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!