%当N=1,h1=0.25时,利用Matlab软件实现Parzen窗法的估计过程。
clc;
clear all;
x = randn(1,10000);
px = normpdf(x,0,1);
N1 = 1;
N2 = 16;
N3 = 256;
N4 = 1024;
N5 = 4096;
h1 = 0.25;
h2 = 1.0;
h3 = 4.0;
pNx11 = Parzen_function(x,N1,h1);
pNx12 = Parzen_function(x,N1,h2);
pNx13 = Parzen_function(x,N1,h3);
pNx21 = Parzen_function(x,N2,h1);
pNx22 = Parzen_function(x,N2,h2);
pNx23 = Parzen_function(x,N2,h3);
pNx31 = Parzen_function(x,N3,h1);
pNx32 = Parzen_function(x,N3,h2);
pNx33 = Parzen_function(x,N3,h3);
pNx41 = Parzen_function(x,N4,h1);
pNx42 = Parzen_function(x,N4,h2);
pNx43 = Parzen_function(x,N4,h3);
pNx51 = Parzen_function(x,N5,h1);
pNx52 = Parzen_function(x,N5,h2);
pNx53 = Parzen_function(x,N5,h3);
subplot(5,3,1);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx11,'.');title('N=1,h1=0.25的Parzen窗估计');
subplot(5,3,2);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx12,'.');title('N=1,h1=1.0的Parzen窗估计');
subplot(5,3,3);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx13,'.');title('N=1,h1=4.0的Parzen窗估计');
subplot(5,3,4);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx21,'.');title('N=16,h1=0.25的Parzen窗估计');
subplot(5,3,5);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx22,'.');title('N=16,h1=1.0的Parzen窗估计');
subplot(5,3,6);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx23,'.');title('N=16,h1=4.0的Parzen窗估计');
subplot(5,3,7);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx31,'.');title('N=256,h1=0.25的Parzen窗估计');
subplot(5,3,8);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx32,'.');title('N=256,h1=1.0的Parzen窗估计');
subplot(5,3,9);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx33,'.');title('N=256,h1=4.0的Parzen窗估计');
subplot(5,3,10);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx41,'.');title('N=1024,h1=0.25的Parzen窗估计');
subplot(5,3,11);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx42,'.');title('N=1024,h1=1.0的Parzen窗估计');
subplot(5,3,12);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx43,'.');title('N=1024,h1=4.0的Parzen窗估计');
subplot(5,3,13);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx51,'.');title('N=4096,h1=0.25的Parzen窗估计');
subplot(5,3,14);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx52,'.');title('N=4096,h1=1.0的Parzen窗估计');
subplot(5,3,15);plot(x,px,'.');title('原始概率分布');hold on;plot(x,pNx53,'.');title('N=4096,h1=4.0的Parzen窗估计');
Universe&Black
- 粉丝: 3
- 资源: 9
最新资源
- Delphi 12 控件之VclToFmxConvert.zip
- JAVA的SpringBoot+Vue学生管理系统源码数据库 MySQL源码类型 WebForm
- MySQL数据库标准安装文档-V2.0
- Delphi 12 控件之TMS WEB Core 2.6.1.3 Retail Setup for D11.rar
- html+css+js的我要去旅游之上海市
- Java使用SWT JFreeChart控件实现的小游戏.zip
- 核心资金业务是金融机构的关键业务领域,主要涉及资金的筹集、运用和管理等多个重要环节
- linuxShell脚本进阶.ppt
- AIX系统日常维护与故障排除
- java实现一个简单的植物大战僵尸游戏.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈