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

27 次查看(过去 30 天)
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 个评论
auntieperi
auntieperi 2013-11-24
Please find attached the txt file for the coding I've done so far! Thanks so much!
Image Analyst
Image Analyst 2013-11-24
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.

请先登录,再进行评论。

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by