10-13.m

来自「matlab图像程序.zip」· M 代码 · 共 19 行

M
19
字号
y = linspace(-1,1,100); 
% 产生信号
thr = 0.4;
% 设置阈值
ythard = wthresh(y,'h',thr);
% 执行硬阈值化 
ytsoft = wthresh(y,'s',thr);
% 执行软阈值化
subplot(131)
plot(y,y)
title('原信号')
subplot(132)
plot(y,ythard)
title('硬阈值化信号')
subplot(133)
plot(y,ytsoft)
axis([-1 1 -1 1])
title('软阈值化信号')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?