nafflib#
Functions
Computes NAFF decomposition for a phase space trajectory |
|
Compile nafflibrary for Matlab |
|
Example to test naff within matlab |
- calcnaff(y, yp, win)#
- Computes NAFF decomposition for a phase space trajectory[nu amp phase] = calcnaff(y, yp, win)INPUTS1. Y - position vector2. Yp - angle vector3. WindowType - Window type - 0 {Default} no windowing1 Window of Hann2 etc4. nfreq - Maximum number of fundamental frequencies to search for10 {Default}5. debug - 1 means debug flag turned on0 {Default}Optional Flags‘Debug’ - turn on deubbing flag‘Display’ - print ou results‘Hanning’ - select Window of Hann, WindowType = 1‘Raw’ or ‘NoWindow’ - select Window of Hann, WindowType = 0OUTPUTS1. frequency - frequency vector with sorted amplitudesby default the algorithm try to compute the 10 first fundamentalfrequencies of the system.2. amplitude - amplitudes associated with fundamental frequencies3. phase - phases associated with fundamental frequenciesNOTES1. Mimimum number of turns is 64 (66)2. Number of turn has to be a multiple of 6 for internal optimizationreason and just above a power of 2. Example 1026 is divived by 6 andabove 1024 = pow2(10)ExamplesNT = 9996; % divisible by 6simple quasiperiodic (even period) motiony =2+0.1*cos(pi*(0:NT-1))+0.00125*cos(pi/3*(0:NT-1));yp=2+0.1*sin(pi*(0:NT-1))+0.00125*sin(pi/3*(0:NT-1));[nu ampl phase] = calcnaff(y,yp,1); % with windowing
- naff_cc()#
- Compile nafflibrary for Matlab
- naff_example()#
- Example to test naff within matlab