Matlab中dblquad作积分时出现的问题# Computation - 科学计算
r*a
1 楼
我在做下面那个积分时老是告诉我“??? Attempted to access y(1); index out of
bounds because numel(y)=0.”,请各位老大帮我看看我什么地方搞错了,式中除积分
变量z,r外都是赋有初值的变量。
p1=dblquad(@(z,r) ((z-(y-q/cos(theta)+r*sin(theta))/thegema)/omegaC)^(1.5)*
thegema*exp(-0.5*(z/thegemaS)^2)/((2*pi)^0.5*thegemaS), (y-q/cos(theta)+r*
sin(theta))/thegema,(y-q/cos(theta)+r*sin(theta))/thegema+omegaC,-0.5/
thegema,0.5/thegema,1e-12);
先谢了!
bounds because numel(y)=0.”,请各位老大帮我看看我什么地方搞错了,式中除积分
变量z,r外都是赋有初值的变量。
p1=dblquad(@(z,r) ((z-(y-q/cos(theta)+r*sin(theta))/thegema)/omegaC)^(1.5)*
thegema*exp(-0.5*(z/thegemaS)^2)/((2*pi)^0.5*thegemaS), (y-q/cos(theta)+r*
sin(theta))/thegema,(y-q/cos(theta)+r*sin(theta))/thegema+omegaC,-0.5/
thegema,0.5/thegema,1e-12);
先谢了!