我试图整合一个功能并继续接收警告:
Warning: Infinite or Not-a-Number value encountered.
我一直无法确定为什么会出现这种情况,并希望有人能够解决这个问题。我相信其中一个参数是发出一个Inf值,但我还没能确定哪一个。任何帮助将不胜感激。
lm = 1.75;
Cm = 3.2E6;
fe = 1380;
H = 13.5;
q = 1E-5;
Cw = 4.2E6;
y = 0.0;
x = 0.1;
ts = [0.1 97/24];
Mt = 100;
t = linspace(ts(1)*86400, ts(2)*86400, Mt); % [s]
QL = fe/H;
z = H/2;
Dt = lm/Cm;
r = x.^2+y.^2;
vT = q*Cw*Cm;
T = zeros(size(t));
for i = 1:length(t)
tt = t(i);
fun = @(ze) T_GIGF(z,ze,Dt,tt,vT,r)/sqrt(pi)./sqrt(r+(z-ze).^2);
T(i) = QL/(4*pi*lm)*exp(vT*x/2*Dt).*...
(integral(fun,0,H)-...
integral(fun,-H,0));
end
function func = T_GIGF(z,ze,a,tt,VT,r)
u1 = (r+(z-ze).^2)/(4*a*tt);
u2 = VT^2*(r+(z-ze).^2)/(16*a^2);
func = 0.5*sqrt(pi)*(exp(-2*sqrt(u2)).*erfc(sqrt(u1)-sqrt(u2./u1))+...
exp(+2*sqrt(u2)).*erfc(sqrt(u1)+sqrt(u2./u1)));
end
答案 0 :(得分:0)
你得到这个是因为你的u1和u2是大约1e29的数字!因此,做exp(1e29)超出了双数可以支持的范围:
sqlcon();
cmd = new SqlCommand("select determin.name as name from determin inner join determinjoin on determin.name = determinjoin.name ", con);
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
Console.WriteLine(dr["name"]);
}
Console.ReadLine();
con.Close();
会产生1