# Under which conditions will windowing with a rectangular window intime always lead oscillations in the spectrum?

I'm going through some conceptual questions about windowing signals. I came across the following:

Assume a sinusoidal signal - under which conditions will windowing with a rectangular window intime always lead oscillations in the spectrum? And under which conditions not?

We multiply a $$\sin(t)$$ with a rect window in the time domain. This becomes a convolution of an impulse and a $$\text{sinc}$$ function in the frequency domain.

If the signal is in continuous time, then the spectrum of the signal is not periodic and we will only get one convolution of an impulse and a $$\text{sinc}$$ function. So some oscillations in frequency domain, but not periodic.

If the signal is in discrete time (we have sampled it), then the spectrum of the signal is periodic. Thus, we will get infinitely many convolutions of an impulse with $$\text{sinc}$$ function. So forever oscillating spectrum.

And I was wondering if this is the answer they want. Because it feels like the question wants me to look at some properties of the window and the sine-wave. So my question is am I answering this conceptual question correctly?

## Edit

I tried to write some MATLAB code to check with Richard's answer but I can't seem to get the right thing:

fs = 100;
t = 0:1/fs:2-1/fs;
x = sin(2*pi*t*2);
k = [ones(100,1);zeros(100,1)];
x2 = x'.*k;
plot(t,x2)
X2 = fft(x2);

%Plotting
P2 = abs(X2/200);
P1 = P2(1:200/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = fs*(0:(200/2))/200;
plot(f,P1)