wnoisematlab,MATLAB中⽤wnoise函数测试去噪算法MATLAB中⽤wnoise函数测试去噪算法
sqrt_snr=3;
init=231434;
用subplot函数[x,xn]=wnoise(3,11,sqrt_snr,init);
% WNOISE generate noisy wavelet test data.
% X= WNOISE(FUN,N) returns values of the test function given by FUN, on a
% 2^N sample of [0,1]. [X,XN] = WNOISE(FUN,N,SQRT_SNR) returns the
% previous vector X rescaled such that std(x) = SQRT_SNR. The returned
% vector XN contains the same test vector X corrupted by an additive Gaussian % white noise N(0,1). Then XN has a signal-to-noise ratio of (SQRT_SNR^2).
% [X,XN] = WNOISE(FUN,N,SQRT_SNR,INIT) returns previous vectors X and % XN, but the generator seed is set to INI value.
subplot(3,2,1),plot(x)
title('original test function')
subplot(3,2,2),plot(xn)
title('noised function')
%产⽣⼀个长为2**11点,包含⾼斯⽩噪声的正弦信号,噪声的的标准偏差为3。
lev=5;
xd=wden(x,'heursure','s','one',lev,'sym8');
% [XD,CXD,LXD] = WDEN(X,TPTR,SORH,SCAL,N,'wname')
% returns a de-noised version XD of input signal X obtained by thresholding the % wavelet coefficients. Additional output arguments [CXD,LXD] are the wavelet % decomposition structure of de-noised signal XD.(WDEN根据信号⼩波分解%结构[C,L]对信号进⾏去噪处理,返回处理信号XD,以及XD的⼩波分解%结构{CXD,LXD})。
% TPTR(contains threshold selection rule)='heursure',

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。