Home > ISET > utility > unitFrequencyList.m

unitFrequencyList

PURPOSE ^

Calculate a vector of normalized frequencies for an N-vector

SYNOPSIS ^

function fList = unitFrequencyList(N)

DESCRIPTION ^

 Calculate a vector of normalized frequencies for an N-vector

   fList = unitFrequencyList(N)

 The list is calculated given an input that that is N-samples long. This
 routine handles the case when N is even and odd. 

 The range that comes back, say when N = 100 or N = 101, the DC term is at
 location 51.  The general rule is that if N is even the DC location is at
 N/2 +1. If N is odd, the DC location is at (N+1)/2. 
 
 The main purpose is to get the zero (DC) term into the proper position
 where Matlab expects it.  Then, once we know the maximum frequency
 (Nyquist) in our measurement, we can multiply the returned list here
 times that maximum frequency.
 
 N.B. This routine had a bug for a long time.  Sorry. The DC location was
 improperly placed. Fixed 2005.12.27, I hope. 

 Examples:
   fList = unitFrequencyList(50);  
   fList = unitFrequencyList(51);
   dataFrequencies = fList*nyquistFrequency;

 Copyright ImagEval Consultants, LLC, 2005.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 14-Jan-2007 10:24:23 by m2html © 2003