⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 noisecut.m

📁 matlab时频工具箱
💻 M
字号:
%function noisecut%NOISECUT Unit test for the function NOISECU.%	O. Lemoine - May 1996.N=32768;sig=noisecu(N);% MeanMean=mean(sig);if abs(Mean)>10/sqrt(N), error('noisecu test 1 failed');end% VarianceVar=std(sig).^2;if abs(Var-1)>10/sqrt(N), error('noisecu test 2 failed');end% histogramsig=noisecu(N);Nh=100;h=hist(real(sig),Nh); h=h/mean(h);pdf=ones(1,Nh);if any(abs(h-pdf).^2>10/sqrt(N)), error('noisecu test 3 failed');end% For N=1 N=1; Np=10000;for k=1:Np, sig(k)=noisecu(N);endMean=mean(sig);if abs(Mean)>10/sqrt(Np), error('noisecu test 4 failed');endVar=std(sig).^2;if abs(Var-1)>10/sqrt(Np), error('noisecu test 5 failed');endh=hist(real(sig),Nh); h=h/mean(h);if any(abs(h-pdf).^2>10/sqrt(Np)), error('noisecu test 6 failed');end% For N=2N=2;for k=1:2:(Np-1), noise=noisecu(N); sig(k)=noise(1); sig(k+1)=noise(2);endMean=mean(sig);if abs(Mean)>10/sqrt(Np), error('noisecu test 7 failed');endVar=std(sig).^2;if abs(Var-1)>10/sqrt(Np), error('noisecu test 8 failed');endh=hist(real(sig),Nh); h=h/mean(h);if any(abs(h-pdf).^2>10/sqrt(Np)), error('noisecu test 9 failed');end

⌨️ 快捷键说明

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