zoukankan      html  css  js  c++  java
  • 二维高斯函数(中间暗)、正条纹图与环形条纹图

    二维高斯函数

    %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))

    显示:

  • 相关阅读:
    yii中通过HTTP post接收
    网络编程
    python 异常处理
    面向对象(2)
    面向对象
    什么是模块精讲
    常用模块二
    各种推导式详解
    匿名函数
    迭代器生成器
  • 原文地址:https://www.cnblogs.com/MrZheng9511/p/gauss.html
Copyright © 2011-2022 走看看