MATLAB: Difference in Wavelet decompostion coefficients

image analysismatlab guiWavelet Toolbox

Hi,
I have a signal of size 36X1 and I get different values of the approximate coefficients when I use the GUI in wavelet toolbox vs when I script it. For the script I have tried both the dwt and the wavedec function with wavetype as 'db4'. I have tried different levels of decomp too but the approximate coefficients at level 'x' that I export from the GUI is not the same as the one I get from the script? Any help would be appreciated.
Thanks
Romendra
I retrieved the approximate coefficients from the script using the appcoef() function

Best Answer

wrcoef() gives the orthogonal projection of the signal onto the vector subspace (approximation or wavelet) at the given level.
If you want to get the approximation coefficients from the GUI then you can do:
Export to Workspace -> Export Coefficients
Assume the variable in the workspace is my_VAR_1, then
appcoeff = my_VAR_1.coefs(1:my_VAR_1.longs(1));
are the approximation coefficients at the level of the GUI decomposition.