You need to have installed the toolbox that Youssef mentioned in your other question, http://www.mathworks.co.uk/matlabcentral/answers/61437,
% WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY
% http://taco.poly.edu/WaveletSoftware/
Once you have that installed, use
which -all afb2D_A
If it does not show up then you do not have the toolbox installed correctly.
If it does show up, but the program still does not work, then when you call
w = dualtree2D(x, J, Faf, af)
try changing that to
xdouble = im2double(x);
w = dualtree2D(xdouble, J, Faf, af);