Add Example

This commit is contained in:
Ksyer
2024-11-11 16:32:53 +08:00
parent a2cb6d1825
commit 29ae9585f9
56 changed files with 4029 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
function y = sft_thd(x, thd)
if isequal(size(x), size(thd))
tmp = abs(x);
y = x;
y(tmp <= thd) = 0;
y(tmp > thd) = (tmp(tmp > thd) - thd(tmp > thd)) .* x(tmp > thd) ./ tmp(tmp > thd);
else
tmp = abs(x);
y = x;
y(tmp <= thd) = 0;
y(tmp > thd) = (tmp(tmp > thd) - thd) .* x(tmp > thd) ./ tmp(tmp > thd);
end
end