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

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====sig2osp=====
Convert an amplitude spectrum to an order spectrum.
;Usage:
:<code>sig2osp(<var>x</var>, <var>sr</var>, <var>f1</var> {, <var>do</var>, <var>no</var>, <var>oini</var>})</code>
:;<var>a</var>:amplitude or power spectrum (vector)
:;<var>sr</var>:signal sampling rate in Hz; 0 < ''sr''
:;<var>f1</var>:frequency of the 1st order in Hz; 0 < ''f1'' < ''sr''/4
:;<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 1: The function computes the amplitude spectrum of the signal ''x'' using a radix-2 fft. The signal is expanded with zeros to the next possible fft transformation length if necessary. The same resampling algorithm as used by the function [[../asp2osp]] is used to convert the frequency spectrum to an order spectrum.
;Result: The order spectrum ''o'' (vector with ''no'' elements).


=====Usage:=====
;See also: [[Programmer_Guide/Command_Reference/EVAL/ticks2f1|ticks2f1]], [[Programmer_Guide/Command_Reference/EVAL/asp2osp|asp2osp]], [[Programmer_Guide/Command_Reference/EVAL/otrack1|otrack1]]


<code>sig2osp(<var>x</var>, <var>sr</var>, <var>f1</var>, <var>do</var>, <var>n</var>, <var>amin</var>)</code>
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]
 
=====Function:=====
 
Computes an amplitude spectrum (fft) of the signal <var>x</var> and converts it to an order spectrum.
 
=====Parameters:=====
 
;<var>x</var>
 
:The signal.
 
;<var>sr</var>
 
:The sampling rate of <var>x</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.

Revision as of 14:47, 13 April 2011

Convert an amplitude spectrum to an order spectrum.

Usage
sig2osp(x, sr, f1 {, do, no, oini})
a
amplitude or power spectrum (vector)
sr
signal sampling rate in Hz; 0 < sr
f1
frequency of the 1st order in Hz; 0 < f1 < sr/4
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 computes the amplitude spectrum of the signal x using a radix-2 fft. The signal is expanded with zeros to the next possible fft transformation length if necessary. The same resampling algorithm as used by the function Programmer Guide/Command Reference/EVAL/asp2osp is used to convert the frequency spectrum to an order spectrum.
Result
The order spectrum o (vector with no elements).
See also
ticks2f1, asp2osp, otrack1

<function list>

Navigation menu

Personal tools