diff --git a/Algorithm/Statistics/高斯分布.md b/Algorithm/Statistics/高斯分布.md new file mode 100644 index 0000000..86b300c --- /dev/null +++ b/Algorithm/Statistics/高斯分布.md @@ -0,0 +1,29 @@ +# 高斯分布 + +## 一维高斯分布 + +$$G(x)=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}$$ + +Matlab 图像绘制程序: + +```m +sig=1; +mu=0; +x=-5:0.1:5; +gx=e.^(-(x-mu).^2/(2*sig^2))/(sig*sqrt(2*pi)); +plot(x, gx) +``` + +## 二维高斯分布 + +$$G(x,y)=Ae^{(-\frac{(x-x_0)^2}{2\sigma_x^2}+\frac{(y-y_0)^2}{2\sigma_y^2})}$$ + +Matlab 图像绘制程序: + +```m +x1 = [0:0.1:10]; +y1 = [0:0.1:10]; +[x,y] = meshgrid(x1,y1); +gxy = exp(-((x-5).*(x-5)+(y-5).*(y-5))/18); +surf(x, y, gxy); +```