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

10 views (last 30 days)
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 Comments
auntieperi
auntieperi on 24 Nov 2013
Please find attached the txt file for the coding I've done so far! Thanks so much!
Image Analyst
Image Analyst on 24 Nov 2013
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.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 24 Nov 2013
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.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!