Matlab. How to get the sine wave frequency and the sampling frequency of a sine wave.

Thread Starter

electrogirl

Joined May 2, 2010
47
Define the variables given below and plot the graph using the stem command.
T = 0:0.2:20;
A = 5sin(T);

get the amplitude, sine wave frequency and the sampling frequency of the graph.

this is how I wrote the code in Matlab:
T = 0:0.2:20;
A = 5*sin(T);
stem(T,A)
so, this is our first experiment in our laboratory class in signal processing our lab is ahead compared to our lecture class thats why I still don't know how to deal with this stuffs.
I know that the amplitude is 5. How to get the sine wave frequency and the sampling frequency?

(see attachment for the graph)
 

Attachments

Last edited:

mik3

Joined Feb 4, 2008
4,843
The sinewave frequency is the inverse of the time of a full cycle.

The sampling frequency is the inverse of the time between two samples.
 
Top