Programmer Guide/Command Reference/EVAL/ticks2f1: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
:;<var>len</var>:the frame length in samples; 2 <= ''len'' <= <code>nrow(''x'')/2</code> | :;<var>len</var>:the frame length in samples; 2 <= ''len'' <= <code>nrow(''x'')/2</code> | ||
:;<var>hop</var>:the distance between frames in samples; 0 < ''hop'' <= ''len'' | :;<var>hop</var>:the distance between frames in samples; 0 < ''hop'' <= ''len'' | ||
;Description 2: The tick signal is parted into frames with a length of ''len'' samples and a distance of ''hop'' samples. For each frame the ''rps'' value is computed as described above. | |||
;Result 2: A vector containing the ''rps'' values of the frames of the tick signal ''x''. | ;Result 2: A vector containing the ''rps'' values of the frames of the tick signal ''x''. | ||
;See also: [[Programmer_Guide/Command_Reference/EVAL/asp2osp|asp2osp]], [[Programmer_Guide/Command_Reference/EVAL/sig2osp|sig2osp]], [[Programmer_Guide/Command_Reference/EVAL/otrack1|otrack1]] | ;See also: [[Programmer_Guide/Command_Reference/EVAL/asp2osp|asp2osp]], [[Programmer_Guide/Command_Reference/EVAL/sig2osp|sig2osp]], [[Programmer_Guide/Command_Reference/EVAL/otrack1|otrack1]] | ||
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]] | [[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]] |
Revision as of 13:55, 13 April 2011
Extracts the rps (= the number of rotations per second) value or track from the tick-signal x.
- Usage 1
ticks2f1(x, sr, o)
- x
- the tick signal vector
- sr
- sampling rate of the tick signal in Hz; must be >0
- o
- the order of the tick signal; must be an integer >0
- Description 1
- The function counts the periods of the tick signal and computes the rps value according to the sampling rate sr and the order of the tick signal o. The tick signal x must be a periodic signal (sine wave, triangle, rectangle, sawtooth or pulse) with o periods per rotation.
rps = sr / o * np / (ilast-ifirst)
- with:
np = number of detected periodes ifirst = sample index of the begin of the first periode ilast = sample index of the end of the last periode
- Result 1
- The number of periods per second rps (scalar)
- Usage 2
ticks2f1(x, sr, o , len, hop)
- x, sr, o
- see Usage 1
- len
- the frame length in samples; 2 <= len <=
nrow(x)/2
- hop
- the distance between frames in samples; 0 < hop <= len