Closed tym0027 closed 5 years ago
Hello,
Thanks
wthresh is a built in function from MATLAB wavelet toolbox, basically it's doing soft/hard-threshold. You can replace
ProxJ = @(x, t) wthresh(x, 's', t);
with
ProxJ = @(x, t) sign(x) .* max(abs(x) - t, 0);
This should solve the problem.
-Best
Hello, I want to modify the threshold function in the wavelet packet threshold method, the original threshold function is
y=sgn(w)*(|w|-t)
tmp = (abs(x)-t);
tmp = (tmp+abs(tmp))/2;
y = sign(x).*tmp;
You want to change the threshold function to
y=sgn(w)* [|w|^2-t^2]^(1/2)
How to convert this mathematical function into matlab language
If you see any questions, please reply, I would appreciate it!
Hi there,
I didn't quite get your question, but for
y=sgn(w)* [|w|^2-t^2]^(1/2)
the corresponding MATLAB command would be
y = sign(w) .* sqrt( max(w.^2-t^2, 0) )
Thank you. I understand. Recently something did not log in GitHub, did not see the message, I am very sorry. Thank you so much for answering my questions. I really appreciate it
22考研杜博文 @.***
------------------ 原始邮件 ------------------ 发件人: "Jingwei @.>; 发送时间: 2023年11月27日(星期一) 晚上7:05 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [jliang993/Faster-FISTA] Matlab version (#2)
Hi there,
I didn't quite get your question, but for y=sgn(w) [|w|^2-t^2]^(1/2) the corresponding MATLAB command would be y = sign(w) . sqrt( max(w.^2-t^2, 0) )
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Hey!
Great work on this repo.
I am using Matlab 2018Ra and when I run the code I get the error: Undefined function 'wthresh' for input arguments of type 'double'.
And when I check which wthresh function is being used I get: 'wthresh' not found.
Where did you get this function from?
Thanks! tym0027