MATLAB: Windowing a sine signal


I dont know what is windowing. Or it is writen wrong, So correct me if it is wrong and help me to solve this problem.
I tried but it is out-off my knowledge.

Best Answer

  • This shows an example of windowing a signal
    t = linspace(-2*pi, 2*pi);
    y = sin(t);
    window = (t-0 > 0) - (t-2 > 0);
    windowed_y = window.*y;
    plot(t, y);
    plot(t, windowed_y);