matlab coding for graph

Status
Not open for further replies.

manifolds

Newbie level 5
Joined
Jul 7, 2005
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,358
complicated matlab graph

here is my problem

let say i want to plot function y=sinx. (this is just for example, of course the real case is much more complicated)
so in matlab i write plot y.
and now i want to have the period of the graph. (we know in this case the period is 2 pi).
how can i get that?
is there any command for that?
getperiod? hehe..i know no such thing rite? heheh..

help2!
 

You can do a FFT on y and find out the dominant spectral component.
 

what is FFT? is it Fast Fourier Transform? how to do that in matlab nway?
 

Period of the graph? Do you mean the period of the waveform, or the min-to-max span of the graph's x axis?

FFT is a good way to estimate frequency. Type help fft

Here's a really easy way to plot a sine wave:
ezplot('sin')
 


Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…