Mu Analysis and Synthesis Toolbox | ![]() |
Extract a specified portion of a VARYING matrix
Syntax
[matout,err] = xtract(mat,iv_low,iv_high) [matout,err] = xtract(mat,ivdes) [matout,err] = xtracti(mat,indvindex)
Description
xtract
extracts a portion of a VARYING matrix. The independent variable associated with a VARYING matrix monotonically increases (like frequency or time). In the first form, xtract
is called with three input arguments: a VARYING matrix, a lower bound iv_low
, and an upper bound iv_high
. The matrix values associated with any independent variables between iv_low
and iv_high
are extracted, and returned as a VARYING matrix. In the second form, xtract
is called with two arguments. The second argument is a vector of desired independent variable values. For each desired value, the matrix from mat
with the closest independent variable value (in absolute value) is extracted.
xtracti
extracts the value of the VARYING matrix at the specific indices indvindex
of the independent variable. Hence indvindex
should be an array of positive integers. The extracted matrix is returned as a VARYING matrix.
Examples
Extract ranges of independent variable from a VARYING matrix.
see(mat) 2 rows2 columns iv = 0.1 2.9703e+00 - 2.9703e-0li5.9406e+00 - 5.9406e-0li 3.9604e+00 - 3.9604e-0li7.9208e+00 - 7.9208e-0li iv = 0.4 2.5862e+00 - 1.0345e+00i5.1724e+00 - 2.0690e+00i 3.4483e+00 - 1.3793e+00i6.8966e+00 - 2.7586e+00i iv = 0.9 1.6575e+00 - 1.4917e+00i3.3149e+00 - 2.9834e+00i 2.2099e+00 - 1.9890e+00i4.4199e+00 - 3.9779e+00i matl = xtract(mat,.3,.8); see(matl) 2 rows2 columns iv = 0.4 2.5862e+00 - 1.0345e+00i5.1724e+00 - 2.0690e+00i 3.4483e+00 - 1.3793e+00i6.8966e+00 - 2.7586e+00i matl = xtracti(mat,2); see(matl) 2 rows2 columns iv = 0.4 2.5862e+00 - 1.0345e+00i5.1724e+00 - 2.0690e+00i 3.4483e+00 - 1.3793e+00i6.8966e+00 - 2.7586e+00i
See Also
sel
, var2con
, vpck
, vunpck
, vfind
![]() | wcperf |