Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
 
 
主题工具 显示模式
旧 2010-07-02, 12:34   #1
jiejie2009
初级会员
 
注册日期: 2009-12-07
年龄: 38
帖子: 7
声望力: 0
jiejie2009 正向着好的方向发展
默认 高斯分布下,求半宽度

最近在做高斯分布的振幅,半高宽NL=30,我只是验证一下我的程序能否算出我输入的高斯分布的振幅的半高宽,可是做出的程序算出来的半高宽是50,请教高手,我错在哪?



clc,clear,close all;
t=200;%时间
m=600;%时间份数

stept=t/m;

Y2=zeros(m,1);
Ip0=zeros(m,1);

NL=30;
for i=1:m%for t
t2=i*stept-t/2;
Ep0(i,1)=exp(-(t2*t2)/(NL*NL));
Y2(i,1)=i;
end%for i
plot(Y2(:,1),Ep0(:,1),'b-');


%计算
temp=max(Ep0(:,1));
Ztemp=-temp+Ep0(:,1);%Φ-Φm
center=Center(m,Ztemp);%center是编号
Ztemp1=Ep0(:,1)-(temp/2);%Φ-Φm/2
Ztemp2=abs(Ztemp1);
Ztemp3=submatrix(1,center,Ztemp2);
Ztemp4=min(Ztemp3);
Ztemp5=Ztemp3-Ztemp4;
T1=Center(center,Ztemp5);
Tleft=T1*stept;
Ztemp12=submatrix(center+1,m,Ztemp2);
Ztemp13=min(Ztemp12);
Ztemp15=Ztemp12-Ztemp13;
kkk=m-center;
T2=Center(kkk,Ztemp15);
Tright=(T2+center)*stept;
ma=Tright-Tleft
jiejie2009 当前离线   回复时引用此帖
 

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 16:05


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.