function [cA, cD1, cD2, cD3]=mwave3(X,w);
[C,L] = wavedec(X,3,w);
cA = appcoef(C,L,w);
cD1 = detcoef(C,L,1);
cD2 = detcoef(C,L,2);
cD3 = detcoef(C,L,3);

