matlab 小波去噪程序

本文有很多例子,各位看官自行取用:

%%%%   对一维带噪信号进行处理
clear all;clc ;close all;
load noissin;
figure;
s=noissin(1:1000);
subplot(211);plot(noissin);
title('含噪生原始信号');
[C,L]=wavedec(s,3,'sym2');
a=[1 2 3 ]; %% 尺度向量
p=[97 98 95];  %%  阈值向量
nc=wthcoef('d',C,L,a,p); 
sd=waverec(nc,L,'sym2');    
subplot(212); plot(sd);title('消噪后的信号')
%%%%%%%   对信号进行不同的阈值处理
clear all;
clc ;
y=linspace(-1,1,100);
thr=0.4;
%%% 计算软硬阈值
ythard=wthresh(y,'h',thr);
ytsoft=wthresh(y,'s',thr);

figure;
subplot(311);plot(y); grid on; title('原始信号');
subplot(312);plot(ythard);grid on; title('硬阈值信号');
subplot(313);plot(ytsoft);grid on; title('软阈值信号');
% 
clear all;
close all;
clc;

%%%% 软阈值处理
load leleccum;
indx = 1:1024;
x = leleccum(indx);
%产生含噪信号
init = 2055615866;
randn('seed',init);
nx = x + 18*randn(size
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值