Main Content

write

Write values in WPTREE fields

Syntax

T = write(T,'cfs',NODE,COEFS)
T = write(T,'cfs',N1,CFS1,'cfs',N2,CFS2, ...)

Description

T = write(T,'cfs',NODE,COEFS) writes coefficients for the terminal node NODE.

T = write(T,'cfs',N1,CFS1,'cfs',N2,CFS2, ...) writes coefficients CFS1, CFS2, ... for the terminal nodes N1, N2, ....

Caution

The coefficients values must have the suitable size. You can use S = read(T,'sizes',NODE) or S = read(T,'sizes',[N1;N2; ...]) in order to get those sizes.

Examples

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

% Plot tree t and click the node (0,0) (see the plot function).
plot(t);

% Write values.
sNod = read(t,'sizes',[4,5,7]);  
cfs4 = zeros(sNod(1,:));
cfs5 = zeros(sNod(2,:));
cfs7 = zeros(sNod(3,:));
t = write(t,'cfs',4,cfs4,'cfs',5,cfs5,'cfs',7,cfs7);

% Plot tree t and click the node (0,0) (see the plot function).
plot(t)

Version History

Introduced before R2006a

See Also

| | |