Sampling in MATLAB

Discussion in 'Programmer's Corner' started by uttara, Aug 11, 2012.

  1. uttara

    Thread Starter New Member

    Aug 11, 2012
    1
    0
    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 .
     
Loading...