# Spectral Leakage: Number of Samples

Is there a relationship for calculating the number of samples ($N$) that must be used in order to minimize spectral leakage of a discrete time signal.

For example, given a signal

$$x[n] = \sin(2\pi f_0 n T)$$

and $f_0 = 5, T = 0.02, n = 0, \ldots, N-1$, and no information regarding the sampling frequency, how do we choose the value for $N$?

I saw somewhere that $N$ would be equivalent to the sampling frequency, yet again, assuming that isn't available, is there a way of obtaining $N$?

The DFT of a discrete-time sinusoid will only have components at the sinusoid's frequency if there are an integer number of periods inside the window. I.e., you must figure out the period $M$ of the sinusoid and choose the number of points $N$ as an integer multiple of $M$ ($N=kM$). I'm sure you can figure out the period of the given sinusoid.