Demo entry 6647996

中心极限定理

   

Submitted by li on Oct 22, 2017 at 14:32
Language: Matlab. Code size: 242 Bytes.

clc;
clear all;
x0=-4:0.01:4; y0=normpdf(x0,0,1);
subplot(1,2,1); 
plot(x0,y0); 
title('标准高斯分布图');

y=normrnd(0,1,[10000,1]);
[f,xi] = ksdensity(y);
subplot(1,2,2);
plot(xi,f); 
title('随机高斯分布生成数概率密度曲线'); 
Exp=mean(y);
Var=var(y);

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).