read
Read values of WPTREE
Syntax
VARARGOUT = read(T,VARARGIN)
Description
VARARGOUT = read(T,VARARGIN)
is the most
general syntax to read one or more property values from the fields
of a WPTREE object .
The different ways to call the read
function
are
PropValue = read(T,'PropName') or PropValue = read(T,'PropName','PropParam')
or any combination of the previous syntaxes:
[PropValue1,PropValue2, ] = read(T,'PropName1','PropParam1','PropName2','PropParam2', )
where 'PropParam'
is optional.
The valid choices for 'PropName'
and 'PropParam'
are
listed in this table.
PropName | PropParam |
---|---|
'ent' , 'ento' or 'sizes' (see wptree ) | Without |
'cfs' | With |
'entName' , 'entPar' , 'wavName' (see wptree ) or 'allcfs' | Without |
'wfilters' (see wfilters ) | Without |
'data' | Without |
Examples
% Create a wavelet packet tree.
x = rand(1,512);
t = wpdec(x,3,'db3');
t = wpjoin(t,[4;5]);
plot(t);
% Click the node (3,0), (see the plot
function).
l% Read values.
sAll = read(t,'sizes');
sNod = read(t,'sizes',[0,4,5]);
eAll = read(t,'ent');
eNod = read(t,'ent',[0,4,5]);
dAll = read(t,'data');
dNod = read(t,'data',[4;5]);
[lo_D,hi_D,lo_R,hi_R] = read(t,'wfilters');
[lo_D,lo_R,hi_D,hi_R] = read(t,'wfilters','l','wfilters','h');
[ent,ento,cfs4,cfs5] = read(t,'ent','ento','cfs',4,'cfs',5);
Version History
Introduced before R2006a