vararout not assigned error when calling wthrmngr

5 ビュー (過去 30 日間)
Phil
Phil 2012 年 1 月 24 日
Hello,
I am trying to use the stationary wavelet transform to denoise a signal, with the threshold defined using wthrmngr, and the denoising parameters are changed using a factorial design as
% Soft or hard thresholding
if sorhThresh == 1
SORH = 's';
else
SORH = 'h';
end
% Multiplicative factor for threshold
if multThresh == 1
SCAL = 'sln';
else
SCAL = 'mln';
end
% Threshold selection rule:
switch threshRule
case 1
TPTR = 'rigrsure';
case 2
TPTR = 'sqtwolog';
case 3
TPTR = 'heursure';
case 4
TPTR = 'minimaxi';
end
SWTDEC = swt(cu,J,wname);
THR = wthrmngr('sw1ddenoLVL',threshRule,SWTDEC,SCAL);
etc...
But for some reason I get the following error, even though the output is assigned to wthrmngr:
Output argument "varargout" (and maybe others)
not assigned during call to
"/Applications/MATLAB_R2011a.app/toolbox/wavelet/wavelet/wthrmngr.m>wthrmngr".
Are some combinations of thresholding rule and multiplicative factor not permitted? Any help would be much appreciated, thank you!
Phil

採用された回答

Wayne King
Wayne King 2012 年 1 月 25 日
Hi Phil, I don't have any trouble running the following on R2011a
x = randn(1024,1);
J = 1;
wname = 'db2';
SWTDEC = swt(x,J,wname);
threshRule = 'rigrsure';
SCAL = 'sln';
THR = wthrmngr('sw1ddenoLVL',threshRule,SWTDEC,SCAL);
  1 件のコメント
Phil
Phil 2012 年 1 月 25 日
Thanks for your help Wayne. It turns out it was just a silly syntax issue - I had the variable 'threshRule' instead of 'TPTR' as an input argument to wthrmngr. Though I do find it a bit strange that there is not error checking when when an interger is input instead of the expected string.

サインインしてコメントする。

その他の回答 (1 件)

Wayne King
Wayne King 2012 年 1 月 25 日
Hi Phil, There isn't such a priori combination that is not permitted that I can think of.
Can you please cite one particular call to wthrmngr that causes this? Including the value of J in the call to swt() on the line before?
Thanks
  1 件のコメント
Phil
Phil 2012 年 1 月 25 日
Hi Wayne,
The first run condition, where all coded run parameters are set to 1 (i.e. SORH = 's', SCAL = 'sln', TPTR = 'rigsure', J = 1, wname = 'db2') immediately triggers this error. I've randomly tried a number of other run conditions, but with the same error.
Thanks,
Phil

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Analysis についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by