首页 > 其他 > 详细

二维高斯函数(中间暗)、正条纹图与环形条纹图

时间:2018-04-16 17:50:17      阅读:251      评论:0      收藏:0      [点我收藏+]

二维高斯函数

%code

fgs = @(x,y)exp(-(sqrt(x.^2+y.^2)-70).^2./(2*30.^2)); %圆环半径70
F2 = fgs(xp,yp);
imagesc(F2)

 

显示:

技术分享图片

 

二维正弦条纹图:

%code 三个相位

clc,clear
[xp,yp] = meshgrid(-100:100,-100:100);
f = @(x,y,i)0.5+0.5*cos(2.*pi.*1/30*x - i/3*2*pi);
for i =1:3
F1(:,:,i) = f(xp,yp,i);
end
subplot(221)
imagesc(F1(:,:,1))
subplot(222)
imagesc(F1(:,:,2))
subplot(223)
imagesc(F1(:,:,3))
subplot(224)
plot(F1(100,:,1))

 

显示:

技术分享图片

 

环形条纹图:

%code 三个相位

clc,clear
[xp,yp] = meshgrid(-100:100,-100:100);
f = @(x,y,i)cos(2.*pi.*1/30.*sqrt(x.^2+y.^2)-i/3*2*pi);
for i =1:3
F1(:,:,i) = f(xp,yp,i);
end
subplot(221)
imagesc(F1(:,:,1))
subplot(222)
imagesc(F1(:,:,2))
subplot(223)
imagesc(F1(:,:,3))
subplot(224)
plot(F1(100,:,1))

 

显示:

技术分享图片

 

二维高斯函数(中间暗)、正条纹图与环形条纹图

原文:https://www.cnblogs.com/MrZheng9511/p/gauss.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!