This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Read values of WPTREE




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 'PropParam' or with 'PropParam' = Vector of node indices, PropValue contains the entropy (or optimal entropy, or size) of the tree nodes in ascending node index order.


With 'PropParam' = One terminal node index. cfs = read(T,'cfs',NODE) is equivalent to cfs = read(T,'data',NODE) and returns the coefficients of the terminal node NODE.

'entName', 'entPar', 'wavName' (see wptree) or 'allcfs'

Without 'PropParam'. cfs = read(T,'allcfs') is equivalent to cfs = read(T,'data'). PropValue contains the desired information in ascending node index order of the tree nodes.

'wfilters' (see wfilters)

Without 'PropParam' or with 'PropParam' = 'd','r','l','h'.


Without 'PropParam' or with 'PropParam' = One terminal node index or 'PropParam' = Column vector of terminal node indices.In this last case, PropValue is a cell array. Without 'PropParam', PropValue contains the coefficients of the tree nodes in ascending node index order.


% Create a wavelet packet tree.
x = rand(1,512);
t = wpdec(x,3,'db3');
t = wpjoin(t,[4;5]);

% 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);

See Also

| | | |

Introduced before R2006a