Programmer Guide/Command Reference/EVAL/asp2osp: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====asp2osp=====
Convert an amplitude spectrum to an order spectrum.
;Usage:
:<code>asp2osp(<var>a</var>, <var>df</var>, <var>f1</var> {, <var>do</var>, <var>no</var>, <var>oini</var>})</code>
:;<var>a</var>:amplitude or power spectrum (vector)
:;<var>df</var>:frequency resolution of the spectrum in Hz; 0 < ''df''
:;<var>f1</var>:frequency of the 1st order in Hz; 0 < ''f1''
:;<var>do</var>:resolution of the order spectrum; 0 < ''do'' (default=0.1)
:;<var>no</var>:length of the order spectrum; 2 < ''no'' (default=500)
:;<var>oini</var>:amplitude value for order spectrum initialization (default=0)
;Description: 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) or 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''-1)</code>. All bins of ''o'' outside the frequency range of ''a'' (<code>0..''df''*(nrow(''a'')-1)</code>) are set the value ''oini''.
;Result: The order spectrum ''o'' (vector with ''no'' elements).


=====Usage:=====
;See also: [[../ticks2f1|ticks2f1]], [[../sig2osp|sig2osp]], [[../otrack1|otrack1]]


<code>asp2osp(<var>a</var>, <var>df</var>, <var>f1</var>, <var>do</var>, <var>n</var>, <var>amin</var>)</code>
[[../#Functions|<function list>]]
 
=====Function:=====
 
Converts an amplitude spectrum to an order spectrum.
 
=====Parameters:=====
 
;<var>a</var>
 
:An amplitude spectrum.
 
;<var>df</var>
 
:The frequency resolution of <var>a</var>.
 
;<var>f1</var>
 
:The first order frequency.
 
;<var>do</var>
 
:The order resolution of the result (<code>frequency resolution =</code> <var>do</var><code>*</code><var>f1</var>).
 
;<var>n</var>
 
:The number of order lines.
 
;<var>amin</var>
 
:The default amplitude for unassigned order lines.
 
=====Result:=====
 
An order spectrum with <var>n</var> elements.

Latest revision as of 14:48, 13 April 2011

Convert an amplitude spectrum to an order spectrum.

Usage
asp2osp(a, df, f1 {, do, no, oini})
a
amplitude or power spectrum (vector)
df
frequency resolution of the spectrum in Hz; 0 < df
f1
frequency of the 1st order in Hz; 0 < f1
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
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) or 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-1). All bins of o outside the frequency range of a (0..df*(nrow(a)-1)) are set the value oini.
Result
The order spectrum o (vector with no elements).
See also
ticks2f1, sig2osp, otrack1

<function list>

Navigation menu

Personal tools