Show Guass Template


%% show Guass Template
clc;clearvars;close all;
%G(x,y,\sigma)=frac{1}{2 \pi \sigma^2} e^{-(x^2+y^2)/{2 \sigma^2}}

pi=3.1415926;
[x,y]=meshgrid(-10:1:10);
sigma=1.6;
G=1/(2*pi*sigma^2)*exp(-(x.^2+y.^2)/(2*sigma.^2));

figure(1);
subplot(2,2,1);
surface(x,y,G);
subplot(2,2,3);
mesh(x,y,G);
sigma=0.5;
G2=1/(2*pi*sigma^2)*exp(-(x.^2+y.^2)/(2*sigma.^2));
subplot(2,2,2);
surface(x,y,G2)
subplot(2,2,4);
mesh(x,y,G2);
saveas(gcf,'gauss_template.png');

这里写图片描述

posted on 2016-09-20 21:45  Raby_Draby  阅读(116)  评论(0)    收藏  举报

导航