The DFT of a rectangular signal x[n] is found to be a sinc signal.
X[k]=πNksin(πNkL)
This sinc signal has a main lobeA lobe is the part of the spectrum that looks like an inverted parabola. that is centered around the frequency bin k=0. To find the amplitude at the y-axis that determines the height of the main lobe, we can’t put k=0 in the expression above because both the numerator and denominator become zero, generating an indeterminate form.
Main lobe peak
From the DFT definition, we have
X[k]=n=−2N∑2Nx[n]e−j2πNkn=n=−2L−1∑2L−1e−j2πNkn
for an odd-length L rectangular signal. Plug in k=0 at this stage to get:
X[0]=n=−2L−1∑2L−11=L
Interestingly, the value X[0] is the sum of all the time domain samples and is known as its DC value if divided by N.