I have finally solved the problem. I've replaced wdencmp with wthcoef and the compiler liked it. Still I have no clue why I got the error, since wdencmp uses wthcoef. Oh well... I am posting the working function if someone needs it.
function out = denoise(input)
thr = [...
0.013347585482866 ; ...
0.015872023591907 ; ...
0.144506458583803 ; ...
0.374411347716711 ; ...
0.000000000000000 ; ...
0.000000000000000 ; ...
0.000000000000000 ; ...
0.000000000000000 ; ...
0.000000000000000 ; ...
0.000000000000000 ; ...
0.000000000000000 ; ...
0.000000000000000 ...
];
c = zeros(4170,1);
l = zeros(14,1);
[c,l] = wavedec(input,12,'sym4');
c(1:l(1)) = zeros(1,l(1));
cxc = wthcoef('t',c,l,1:12,thr,'s');
lxc = l;
out = waverec(cxc,lxc,'sym4');
end
Best Answer