Linked Questions

Popular Questions

Plotting sine wave in MATLAB

Asked by At

I need to plot a sine wave of analog frequency of 8Hz, with a sampling rate of 5000/sec and a duration of 5 seconds. Is this the correct way of how to do it?

   Fs = 5000;                  
   dt = 1/Fs;                 
   t = 0: dt: 5;

   Fc = 8;                   
   x = sin(2*pi*Fc*t);

   figure;
   plot(t,x);

Related Questions