This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Write values in WPTREE fields


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


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, ....


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.


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

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

See Also

| | |

Introduced before R2006a

Was this topic helpful?