How can I find the frequency and period of a simple graph?

I am a newbie at MATLAB so I'm having some trouble doing some of the basics stuff. From a set of x and y coordinates I have created the graph below.
What is the easiest way to find the frequency and period of this graph? Would I need to use some sort of code to find each peak and then divide by time in order to find the period or is there a simpler way to do this?
Your help is much appreciated!
Also, again, baby steps for the newbie.

3 Commenti

There are many techniques, please attach the data as a .mat or .txt file
Please find attached the txt file for the coding I've done so far! Thanks so much!
That's not the code used to make that plot above. For example there is no call to xlabel or ylabel or title like that plot did. Leads me to think that this is homework, but you didn't label it as such. Is it homework? If so, you'd need to put forth some more effort than a single line of code calling plot() to make sure we don't just hand over the answer to you.

Accedi per commentare.

Risposte (1)

Do you have the Signal Processing Toolbox (type ver to check). If so, you can use find peaks to determine the peak locations, and hence, the period.

Richiesto:

il 20 Nov 2013

Commentato:

il 24 Nov 2013

Community Treasure Hunt

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

Start Hunting!

Translated by