高斯光束的MATLAB仿真HIT1、程序如下:functionGAUSSpict1=imread('高斯.bmp');pict2=rgb2gray(pict1);A1=pict2(:,122);X1=1:1:224;x2=-100:1:100;a2=exp(-x2.^2/10);figuresubplot(2,4,[3,4,7,8])imshow(pict1);axisofftitle('\fontsize{12}CCD采集的高斯光束光强分布');subplot(2,4,[1,5])plot(x2,a2,'linewidth',1,'color','b');axis([-404001.2])title('\fontsize{12}理论高斯曲线')subplot(2,4,[2,6])plot(X1,A1,'linewidth',1,'color','r')title('\fontsize{12}实验测量高斯曲线')axis([502000180])end2、最终运行结果如下: