- •If the values along the first non-singleton dimension contain more
- •If the values along the first non-singleton dimension contain more
- •Finite differences
- •In the z direction. Gradient(f,h), where h is a scalar,
- •Is a scalar, it gives the spacing between points in the
- •Correlation
- •Variances for each column, and sqrt(diag(cov(X))) is a vector
- •Filtering and convolution
- •Iddata/detrend
Variances for each column, and sqrt(diag(cov(X))) is a vector
of standard deviations. COV(X,Y), where X and Y are matrices with
the same number of elements, is equivalent to COV([X(:) Y(:)]).
COV(X) or COV(X,Y) normalizes by (N-1) if N>1, where N is the number of
observations. This makes COV(X) the best unbiased estimate of the
covariance matrix if the observations are from a normal distribution.
For N=1, COV normalizes by N.
COV(X,1) or COV(X,Y,1) normalizes by N and produces the second
moment matrix of the observations about their mean. COV(X,Y,0) is
the same as COV(X,Y) and COV(X,0) is the same as COV(X).
The mean is removed from each column before calculating the
result.
Class support for inputs X,Y:
float: double, single
See also corrcoef, var, std, mean.
Overloaded methods:
fints/cov
xregtwostage/cov
xregmultilin/cov
xregmodel/cov
xreglinear/cov
xregcovariance/cov
localsurface/cov
Reference page in Help browser
doc cov
<subspace> - Angle between subspaces.
SUBSPACE Angle between subspaces.
SUBSPACE(A,B) finds the angle between two subspaces specified by the
columns of A and B.
If the angle is small, the two spaces are nearly linearly dependent.
In a physical experiment described by some observations A, and a second
realization of the experiment described by B, SUBSPACE(A,B) gives a
measure of the amount of new information afforded by the second
experiment not associated with statistical errors of fluctuations.
Class support for inputs A, B:
float: double, single
Reference page in Help browser
doc subspace
Filtering and convolution
<filter> - One-dimensional digital filter.
FILTER One-dimensional digital filter.
Y = FILTER(B,A,X) filters the data in vector X with the
filter described by vectors A and B to create the filtered
data Y. The filter is a "Direct Form II Transposed"
implementation of the standard difference equation:
a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
- a(2)*y(n-1) - ... - a(na+1)*y(n-na)
If a(1) is not equal to 1, FILTER normalizes the filter
coefficients by a(1).
FILTER always operates along the first non-singleton dimension,
namely dimension 1 for column vectors and non-trivial matrices,
and dimension 2 for row vectors.
[Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final
conditions, Zi and Zf, of the delays. Zi is a vector of length
MAX(LENGTH(A),LENGTH(B))-1, or an array with the leading dimension
of size MAX(LENGTH(A),LENGTH(B))-1 and with remaining dimensions
matching those of X.
FILTER(B,A,X,[],DIM) or FILTER(B,A,X,Zi,DIM) operates along the
dimension DIM.
See also filter2 and, in the signal Processing Toolbox, filtfilt, filtic.
Overloaded methods:
timeseries/filter
gf/filter
channel.filter
LagOp/filter
mfilt.filter
adaptfilt.filter
fints/filter
fxptui.filter
sweepsetfilter/filter
sweepset/filter
dfilt.filter
Reference page in Help browser
doc filter
<filter2> - Two-dimensional digital filter.
FILTER2 Two-dimensional digital filter.
Y = FILTER2(B,X) filters the data in X with the 2-D FIR
filter in the matrix B. The result, Y, is computed
using 2-D correlation and is the same size as X.
Y = FILTER2(B,X,'shape') returns Y computed via 2-D
correlation with size specified by 'shape':
'same' - (default) returns the central part of the
correlation that is the same size as X.
'valid' - returns only those parts of the correlation
that are computed without the zero-padded
edges, size(Y) < size(X).
'full' - returns the full 2-D correlation,
size(Y) > size(X).
FILTER2 uses CONV2 to do most of the work. 2-D correlation
is related to 2-D convolution by a 180 degree rotation of the
filter matrix.
Class support for inputs B,X:
float: double, single
See also filter, conv2.
Reference page in Help browser
doc filter2
<conv> - Convolution and polynomial multiplication.
CONV Convolution and polynomial multiplication.
C = CONV(A, B) convolves vectors A and B. The resulting vector is
length MAX([LENGTH(A)+LENGTH(B)-1,LENGTH(A),LENGTH(B)]). If A and B are
vectors of polynomial coefficients, convolving them is equivalent to
multiplying the two polynomials.
C = CONV(A, B, SHAPE) returns a subsection of the convolution with size
specified by SHAPE:
'full' - (default) returns the full convolution,
'same' - returns the central part of the convolution
that is the same size as A.
'valid' - returns only those parts of the convolution
that are computed without the zero-padded edges.
LENGTH(C)is MAX(LENGTH(A)-MAX(0,LENGTH(B)-1),0).
Class support for inputs A,B:
float: double, single
See also deconv, conv2, convn, filter and,
in the signal Processing Toolbox, xcorr, convmtx.
Overloaded methods:
gf/conv
Reference page in Help browser
doc conv
<conv2> - Two-dimensional convolution.
CONV2 Two dimensional convolution.
C = CONV2(A, B) performs the 2-D convolution of matrices A and B.
If [ma,na] = size(A), [mb,nb] = size(B), and [mc,nc] = size(C), then
mc = max([ma+mb-1,ma,mb]) and nc = max([na+nb-1,na,nb]).
C = CONV2(H1, H2, A) convolves A first with the vector H1 along the
rows and then with the vector H2 along the columns. If n1 = length(H1)
and n2 = length(H2), then mc = max([ma+n1-1,ma,n1]) and
nc = max([na+n2-1,na,n2]).
C = CONV2(..., SHAPE) returns a subsection of the 2-D
convolution with size specified by SHAPE:
'full' - (default) returns the full 2-D convolution,
'same' - returns the central part of the convolution
that is the same size as A.
'valid' - returns only those parts of the convolution
that are computed without the zero-padded edges.
size(C) = max([ma-max(0,mb-1),na-max(0,nb-1)],0).
See also conv, convn, filter2 and, in the signal Processing
Toolbox, xcorr2.
Overloaded methods:
uint8/conv2
uint16/conv2
Reference page in Help browser
doc conv2
<convn> - N-dimensional convolution.
CONVN N-dimensional convolution.
C = CONVN(A, B) performs the N-dimensional convolution of
matrices A and B. If nak = size(A,k) and nbk = size(B,k), then
size(C,k) = max([nak+nbk-1,nak,nbk]);
C = CONVN(A, B, 'shape') controls the size of the answer C:
'full' - (default) returns the full N-D convolution
'same' - returns the central part of the convolution that
is the same size as A.
'valid' - returns only the part of the result that can be
computed without assuming zero-padded arrays.
size(C,k) = max([nak-max(0,nbk-1)],0).
Class support for inputs A,B:
float: double, single
See also conv, conv2.
Reference page in Help browser
doc convn
<deconv> - Deconvolution and polynomial division.
DECONV Deconvolution and polynomial division.
[Q,R] = DECONV(B,A) deconvolves vector A out of vector B. The result
is returned in vector Q and the remainder in vector R such that
B = conv(A,Q) + R.
If A and B are vectors of polynomial coefficients, deconvolution
is equivalent to polynomial division. The result of dividing B by
A is quotient Q and remainder R.
Class support for inputs B,A:
float: double, single
See also conv, residue.
Overloaded methods:
gf/deconv
Reference page in Help browser
doc deconv
<detrend> - Linear trend removal.
DETREND Remove a linear trend from a vector, usually for FFT processing.
Y = DETREND(X) removes the best straight-line fit linear trend from the
data in vector X and returns the residual in vector Y. If X is a
matrix, DETREND removes the trend from each column of the matrix.
Y = DETREND(X,'constant') removes just the mean value from the vector X,
or the mean value from each column, if X is a matrix.
Y = DETREND(X,'linear',BP) removes a continuous, piecewise linear trend.
Breakpoint indices for the linear trend are contained in the vector BP.
The default is no breakpoints, such that one single straight line is
removed from each column of X.
Class support for inputs X,BP:
float: double, single
See also mean
Overloaded methods:
timeseries/detrend
