When comparing my MATLAB code to a previously written one, I come across the following formula for the number of vectors to sample:

n = \text{fix}(p * sqrt(2/3*c))) % n - number of vectors to sample , p - number of pixels in the image
                                 % c - compression amount

The resulting number is used as the "Nyquist cut-off frequency" to choose which vectors to sample from the image:

FX = ceil(-n/2:n/2-1)/p*2*pi

Could someone explain to me the first equation? I don't understand where this equation comes from and how it can select the correct number of vectors to sample for a specific compression amount.

I have previously seen the second equation in the following question, but why is the Nyquist cut-off frequency multiplied by $ 2 \pi/ p$? How was this deduced?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.