Programmer Guide/Command Reference/EVAL/asp2osp: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
:;<var>no</var>:length of the order spectrum; 2 < ''no'' (default=500) | :;<var>no</var>:length of the order spectrum; 2 < ''no'' (default=500) | ||
:;<var>oini</var>:amplitude value for order spectrum initialization (default=0) | :;<var>oini</var>:amplitude value for order spectrum initialization (default=0) | ||
;Description 1: The function implements a fast algorithm to convert a frequency spectrum ''a''=f(''f'') into an order spectrum ao=f(''f1'',''do''). The algorithm uses interpolation (if ''a'' must be expanded) and maximum detection (if ''a'' must be compressed) to approximate the values of the order spectrum. The frequency range of the order spectrum is limited to 0 to <code>''f1''*''do''*''no''</code>. All bins of ''o'' outside the frequency range of ''a'' (<code>0..df*nrow(''a'')-1</code> or <code>''f''[0]..''f''[nrow(''a'')-1]</code> are set the value ''oini''. | ;Description 1: The function implements a fast algorithm to convert a frequency spectrum ''a''=f(''f'') into an order spectrum ao=f(''f1'',''do''). The algorithm uses interpolation (if ''a'' must be expanded) and maximum detection (if ''a'' must be compressed) to approximate the values of the order spectrum. The frequency range of the order spectrum is limited to 0 to <code>''f1''*''do''*''no''</code>. All bins of ''o'' outside the frequency range of ''a'' (<code>0..''df''*(nrow(''a'')-1)</code> or <code>''f''[0]..''f''[nrow(''a'')-1]</code> are set the value ''oini''. | ||
;Result: The order spectrum ''o'' (vector with ''no'' elements). | ;Result: The order spectrum ''o'' (vector with ''no'' elements). | ||
Revision as of 14:28, 13 April 2011
Convert an amplitude spectrum to an order spectrum.
- Usage
asp2osp(a, df, f1 {, do, no, oini})
asp2osp(a, f, f1 {, do, no, oini})
- a
- amplitude or power spectrum (vector)
- df
- frequency resolution of the spectrum in Hz (scalar); 0 < df, f[i]=i*df
- f
- frequency scale of the spectrum in Hz (vector)
- f1
- frequency of the 1st order in Hz
- do
- resolution of the order spectrum; 0 < do (default=0.1)
- no
- length of the order spectrum; 2 < no (default=500)
- oini
- amplitude value for order spectrum initialization (default=0)
- Description 1
- The function implements a fast algorithm to convert a frequency spectrum a=f(f) into an order spectrum ao=f(f1,do). The algorithm uses interpolation (if a must be expanded) and maximum detection (if a must be compressed) to approximate the values of the order spectrum. The frequency range of the order spectrum is limited to 0 to
f1*do*no
. All bins of o outside the frequency range of a (0..df*(nrow(a)-1)
orf[0]..f[nrow(a)-1]
are set the value oini. - Result
- The order spectrum o (vector with no elements).