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

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 3: Line 3:
----
----
;Usage 1:<code>map2map(<var>type</var>, <var>x</var>, <var>nc</var>)</code>
;Usage 1:<code>map2map(<var>type</var>, <var>x</var>, <var>nc</var>)</code>
:;<var>type</var>this argument must be set to '''0'''; it will be used in future to select the format of input data and/or the remapping algorithm
:;<var>type</var>:this argument must be set to '''0'''; it will be used in future to select the format of the input data and/or the remapping algorithm
:;<var>x</var>a NxM matrix containing the input map
:;<var>x</var>a NxM matrix containing the input map
:;<var>nc</var>a vector with length N; the value ''nc''[i] specifies the number of used columns in the row ''x''[i,*] of the input map
:;<var>nc</var>a vector with length N; the value ''nc''[i] specifies the number of used columns in the row ''x''[i,*] of the input map
::<code>2 <= ''nc''[i] <= M; with: i=0..N-1</code>
::<code>2 <= ''nc''[i] <= M; with: i=0..N-1</code>
the length of the interpolated vector; the interpolated vector can be shorter or longer than the original
;Description: Each column i of the input map contains a data vector {''x''[i,0], .., ''x''[''i,''nc''[i]-1]}. A linear interpolation is used to expand all column vectors to the length M.
:;<var>type</var>:the type of interpolation to perform; currently only linear interpolation (''type''='''0''') is supported.
E.g.: The ''x'' column
:;<var>mv</var>:the value to use for 'missing values'. If mv is given, then interpolation is stopped when <code>''x''[i] = ''mv''</code>. This means that the sections without missing values are individually interpolated. If ''mv'' is not supplied, the whole vector ''x'' is interpolated.
;Result 1:A NxM matrix containing the interpolated map ''y''.
;Description: Each column i of the input map contains a data vector {''x''[i,0], .., ''x''[''i,''nc''[i]-1]}. A linear interpolation is used to expand all column vectors to the length M
----
;Result:The interpolated vector ''y'' with length ''n''.  
;Usage 1:<code>map2map(<var>type</var>, <var>x</var>, <var>nc</var>)</code>
:;<var>type, x, nc</var>:see '''Usage 1'''
:;<var>pr</var>a vector with length N; the value ''nc''[i] specifies the number of used columns in the row ''x''[i,*] of the input map
::<code>2 <= ''nc''[i] <= M; with: i=0..N-1</code>
;Description: Each column i of the input map contains a data vector {''x''[i,0], .., ''x''[''i,''nc''[i]-1]}. A linear interpolation is used to expand all column vectors to the length M.
;Result 1:A NxM matrix containing the interpolated map ''y''.


;Notes:
----
:*


;See also: [[Programmer_Guide/Command_Reference/EVAL/rpolyreg|rpolyreg]], [[Programmer_Guide/Command_Reference/EVAL/qinterp|qinterp]], [[Programmer_Guide/Command_Reference/EVAL/map2map|map2map]]
;See also: [[Programmer_Guide/Command_Reference/EVAL/rpolyreg|rpolyreg]], [[Programmer_Guide/Command_Reference/EVAL/qinterp|qinterp]], [[Programmer_Guide/Command_Reference/EVAL/interp|interp]]


[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]
[[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]]

Revision as of 10:35, 12 April 2011

Create a x/y-map with fixed grid (dx and dy is constant) from a x/y-map with varying grid. This function was implemented to display spectrograms with varying hopsize dt and frequency resolution df.


Usage 1
map2map(type, x, nc)
type
this argument must be set to 0; it will be used in future to select the format of the input data and/or the remapping algorithm
xa NxM matrix containing the input map
nca vector with length N; the value nc[i] specifies the number of used columns in the row x[i,*] of the input map
2 <= nc[i] <= M; with: i=0..N-1
Description
Each column i of the input map contains a data vector {x[i,0], .., x[i,nc[i]-1]}. A linear interpolation is used to expand all column vectors to the length M.

E.g.: The x column

Result 1
A NxM matrix containing the interpolated map y.

Usage 1
map2map(type, x, nc)
type, x, nc
see Usage 1
pra vector with length N; the value nc[i] specifies the number of used columns in the row x[i,*] of the input map
2 <= nc[i] <= M; with: i=0..N-1
Description
Each column i of the input map contains a data vector {x[i,0], .., x[i,nc[i]-1]}. A linear interpolation is used to expand all column vectors to the length M.
Result 1
A NxM matrix containing the interpolated map y.

See also
rpolyreg, qinterp, interp

<function list>


//----- // Map2Map(Type_s=0, X_m, NCol_v {, PRow_v}) // // Type_s=0 expand all rows to equal length (use linear interpolation) // if PRow_v is specified: map varying row distances to fixed grid (use linear interpolation) // // X_m input map (N rows, M columns) N > 2, M > 2 // NCol_v NCol_v[n] = the number of used columns in row X_m[n,*]; 0 <= n < N, 2 < NCol[n] < M // PRow_v XRow_v[n] = the relative position of row X_m[n,*]; 0 <= n < N, PRow_[0] < PRow[1] < .. < PRow[N-2] < PRow[NX-1] // // result: without PRow_v: Y_m (N rows, M columns) // with PRow_v: Y_m (NY rows, M columns); NY := int ( (PRow_v[N-1] - PRow_v[0]) / min(PRow_v) ) + 1 //-----

Navigation menu

Personal tools