Matlab Stem Functions

Status
Not open for further replies.

electronicstudent

Newbie level 2
Joined
Nov 25, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
Hi all, I have never done a lot with Matlab but have an assignment to do the requires me to use stem functions to investigate natural sampling of a single base band frequency. I have got the sampling frequency done using the stem functions but am not sure how to go about combing the two. The info signal is a 10 KHz sine wave and the sampling frequency is 50 KHz. The result should be a sinc function with the spectral lines shifted by 10KHz, can any one tell me how i do this in Matlab, and if so can you please dumb it down as Im almost unfamiliar with Matlab.
 

Code:
fSampling = 50000;   % 50Khz Sampling Frequency
fSignal = 10000;
t = 0:1/fSampling:1;
xSignal = sin(2*pi*fSignal*t);
plot(t(1:50),xSignal(1:50))
stem(t(1:50),xSignal(1:50))

Simple Use of Stem and Plot Function

Plot Function Plot


Stem Function Plot


Sampling Frequency > 2*Signal Frequency
 

Hi there, ty for your reply. I have to be able to view that sine wave in the frequency domain and use stem functions to do this. I then have to do the same for the sampling frequency. I then have to convolve these two stem functions together for a result. I understand these from a theory point of view but am unable to do so using matlab.

thanks in advance
~Conor
 


Sorry I didn't get what you want to do...

If u are able to explain me properly then i can help u
 

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