File Exchange

## wvfrms2bases

version 1.0.0.0 (1.38 KB) by
Computes basis for data by sorting signals (3 sort options)

Updated 15 Jan 2008

Computes an orthogonal basis from a given criteria. Options are identical
to those of sortwvfrms: basis are computed by signal width, localization, and
noise. The vectors are sorted by the given criteria, projected onto a
subspace orthogonal to the previously sorted vectors, and sorted in that
subspace, then projected, etc. For example, in the case that 'width' is
used as a sorting option, this function first finds the most 'compact'
waveform among the entire set: that is, the waveform with with the smallest
width. It then projects the matrix of data X onto a subspace orthogonal to
this waveform. The function then finds the waveform with the smallest width
in this subspace, and projects the data onto a subspace orthogonal to it, and
so on. The end result is a basis for X formed of vectors with progressively
broader signal widths. The pdf option finds the 'least noisy' data, as another
example.

[U]=wvfrms2bases(X,varargin)

INPUT
X: a matrix of whose columns form a set of linearly independent
signals/vectors.
sortopt: (optional) a string. Can be either 'width', 'erg' or 'pdf'.
Default is 'width'. This option is what sorts the data. See
above for an explanation or website below.
plotopt: (optional) a string. 'plot' produces a plot. Anything else
doesn't.

OUTPUT
U: an orthonormal matrix. The columns are ordered by the user specifed
criteria. In the case that sortopt = 'width', the first column of U,
given by U(:,1), has the smallest signal width. The next column has
the smallest width among all other vectors in the subspace of
functions orthogonal to U(:,1).

Examples:
[U]=wvfrms2bases(W);
[U]=wvfrms2bases(W,'plot');
[U]=wvfrms2bases(W,'width','plot');
[U]=wvfrms2bases(W,'erg','plot');
[U]=wvfrms2bases(W,'pdf','plot');

### Cite As

Joshua Carmichael (2021). wvfrms2bases (https://www.mathworks.com/matlabcentral/fileexchange/18308-wvfrms2bases), MATLAB Central File Exchange. Retrieved .