Clear Filters
Clear Filters

how to find frequency of a sin wave.

20 views (last 30 days)
Sandhu
Sandhu on 20 Dec 2011
i have a sin wave. i want to find its frequency. or ( if the wave is composed with different frequencies how to find all frequencies)
(actually i plotted this waveform from an array)
here you can see waveform. please ignore the axis values.
please tell me any idea, that how can i find the frequency of this waveform.

Answers (2)

Wayne King
Wayne King on 20 Dec 2011
Hi Naga, you can use fft(). If you have the Signal Processing Toolbox, the easiest thing to use is spectrum.periodogram. With either fft() or spectrum.periodogram, you have to know the sampling frequency. What is the sampling frequency. You have a vector plotted of length 100, but what is the time interval between those samples?
  3 Comments
Wayne King
Wayne King on 20 Dec 2011
what do you mean the time interval varies, are you saying the data are not sampled at equal intervals of time. The data samples are not evenly spaced? Or are you saying, the data samples are evenly spaced, you just don't always know what the interval is? They are very different things.
Philippus van der Merwe
Philippus van der Merwe on 22 Sep 2022
I have the same kind of problem. I have a set of measurement data from a sensor. The sensor has a given sampling rate, but the time stamps of the data readings (reported by the sensor) are not evenly spaced. This could be what he means by varying time intervals.
In my case, this makes it difficult to know the the frequency values of of your FFT readings.

Sign in to comment.


Harismita Ramkumar
Harismita Ramkumar on 6 Dec 2019
how to find frequecy of sin wave

Community Treasure Hunt

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

Start Hunting!