Sampling in MATLAB

Thread Starter

uttara

Joined Aug 11, 2012
1
I need to sample a sinusoid signal sin(2*pi*f*t) , f=3000Hz with sampling frequency = 10,000 Hz .

I did the following but i want a matlab code which does this using an impulse function ...


f1=3000/10000;
w=2*pi*f1;
t=0:0.1/f1:4/f1;
y=sin(w*t);
stem(y)

I am new to this forum so pardon me for any mistakes .
 
Top