From: Oliver on
Dear experts!

I'm sorry about to ask not yet other fft question but I don't know any other solution than this and I hope to find an answer for my problem finally.
Background:
I'm using a rotary encoder with 100 counts per revolution and a 40 MHz counter card. For every increment of the rotary encoder the card counts the total number of values that fits in that increment.
For example: 1. increment = 5000 values = duration of 1. inc [s] = 5000 * (1 / 40E6)

So, I have the following parameters:
% sample-buffer with 100 values per revolution
samples = [5049, 5772, 5096, 5736, 5145, ...];
% length of buffer
points = length(samples); ->is that my needed length for the fft?
% sum of all 100 values
totalSumOfSamples = sum(samples); -> or is that the length?
% CLK of counter = 40MHz
sampleRate = 40E6;
cycleTime = 1 / sampleRate;
% total time of sampling
duration = cycleTime * totalSumOfSamples;

My problem is that I don't have a clue which further parameters I need and how to use them to perform a fft and plot the spectrum. Do I have all needed parameters or is something missing? A step-by-step explanation would be great.

Thanks in advance for any comment and suggestion!!
Oliver