- The frequency resolution is calculated as sampling frequency divided
by number of input values.

So, the resolution does not depend on signal values - it depends on sampling frequency and number of samples. Assume the former is 44100, the latter is 1024. Then the frequency step is 44100/1024 = 43.066Hz - An array is an ordered set of values. Every value has its index ('position' might be a better word) in the array. In many programming languages, arrays are assumed to be zero-based, i.e. an index of the first element is 0 (in spite of common sense).
- In signal processing, and in computer-aided measurements generally, arrays are implicitly assumed to possess a certain argument step between values. Thus, for samples in time domain, the step is sampling period (which is equal to 1 / sampling frequency). Assume that sampling frequency is 2 Hz, i.e. two samples per second are measured. Then the 1st value is supposed to be measured at moment '0', the second - half a second later, the 3rd - 1 second after the measurement beginning, the next - at moment 1.5, and so on.
- When talking about spectra, the step is called frequency resolution.
Let's get back to step 1, and assume the sampling frequency is 44100 Hz and
number of samples is 1024. The frequency resolution is 43.066 Hz, thus the
first amplitude value corresponds to zero frequency (a kind of constant
component - zero frequency means there are no changes at all). The
**n**-th amplitude value corresponds to the frequency calculated as**(n-1)*resolution** - Look at the images below. The first is time signal, the second is
corresponding amplitude spectrum.
There are 64 values in the sampled time signal.

Assume the sampling frequency is 44100. Then the signal duration is 64 / 44100 = 0,00141 sec. It would be exactly 1 sec if we had 44100 samples - but we only have 64.

The signal consists of constant component and a sine wave. It is also important to note that exactly 4 periods of sine wave fit in the time signal being analysed.Corresponding 32 amplitude values of the signal spectrum are shown on another figure, and - oh, that's a surprise! - none-zero frequency component is found in the 5th value, and 5 is 4 plus 1. That's why it's convenient to use zero-based arrays. Then we would call the value 4th, not 5th. Then resolution is 44100 / 64 = 689 Hz, and the sine wave frequency is 4 * 689 = 2756 Hz. -
**Frequency_Resolution = 1 / Sampled_Signal_Duration**