Programmer Guide/Command Reference/EVAL/qinterp: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
Compute interploated coordinates of local peaks of a function using 2nd order interpolation. | Compute interploated coordinates of local peaks of a function using 2nd order interpolation. | ||
;Usage: | ;Usage: | ||
:<code>qinterp(<var>dx</var><sub>scalar</sub>, <var>y</var>, <var>ip</var> {, <var>nwidth</var>})</code> | :<code>qinterp(<var>dx</var><sub>scalar</sub>, <var>y</var>, <var>ip</var> {, <var>nwidth</var>})</code> | ||
:<code>qinterp(<var> | :<code>qinterp(<var>x</var><sub>vector</sub>, <var>y</var>, <var>ip</var> {, <var>nwidth</var>})</code> | ||
:;<var>dx<var>:distance bewteen x values | :;<var>dx</var>:distance bewteen x values; <code>x[i] = ''dx'' * i</code> | ||
:;<var>x<var>:x data vector | :;<var>x</var>:x data vector | ||
:;<var>y</var>:y data vector | :;<var>y</var>:y data vector; <code>y[i] = f(x[i])</code>. | ||
:;<var>ip</var>: a scalar or vector containing the indices of local maxima | :;<var>ip</var>: a scalar or vector containing the indices of local maxima | ||
:;<var>nwidth</var>: the width to be used for interpolation | :;<var>nwidth</var>: the width to be used for interpolation | ||
;Result: A vector ''r'' with 2 elements (''r''[0] = xpeak, ''r[1]'' = ypeak) or a matrix with two rows (''r''[0,j] = xpeak<sub>j</sub>, ''r[1,j]'' = ypeak<sub>j</sub>) containing the interpolated coordinates of the local maxima (peaks). For the 2nd order (parabolic) interpolation the (x,y) points at ''ip-npeaks'', ''ip'' and ''ip+npeask'' are used. | ;Result: A vector ''r'' with 2 elements (''r''[0] = xpeak, ''r[1]'' = ypeak) or a matrix with two rows (''r''[0,j] = xpeak<sub>j</sub>, ''r[1,j]'' = ypeak<sub>j</sub>) containing the interpolated coordinates of the local maxima (peaks). For the 2nd order (parabolic) interpolation the (x,y) points at ''ip-npeaks'', ''ip'' and ''ip+npeask'' are used. | ||
;See also: [[../ipeak|ipeak]], [[../formants|formants]], [[../interp|interp]] | |||
[[../#Functions|<function list>]] | |||
Latest revision as of 11:34, 21 April 2011
Compute interploated coordinates of local peaks of a function using 2nd order interpolation.
- Usage
qinterp(dxscalar, y, ip {, nwidth})
qinterp(xvector, y, ip {, nwidth})
- dx
- distance bewteen x values;
x[i] = dx * i
- x
- x data vector
- y
- y data vector;
y[i] = f(x[i])
. - ip
- a scalar or vector containing the indices of local maxima
- nwidth
- the width to be used for interpolation
- Result
- A vector r with 2 elements (r[0] = xpeak, r[1] = ypeak) or a matrix with two rows (r[0,j] = xpeakj, r[1,j] = ypeakj) containing the interpolated coordinates of the local maxima (peaks). For the 2nd order (parabolic) interpolation the (x,y) points at ip-npeaks, ip and ip+npeask are used.
- See also
- ipeak, formants, interp