Hi:
I used quad2d to calculate my integration with v1 and h as variables. However, I still met problems. The codes and error information are given below. Could you please let me know what is the problem now?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
hmean=2.05968688845401; % from experiment data
hvar=1.11733636789457; % from experiment data
vmu=42*5280/3600;
theta=7*5280/3600;
alpha=0.1;
beta=0.1;
y=450;
for v=1:1:120
v2=v*5280/3600;
F=@(v1,h) (1(0.5*exp(0.717*((h2.5+y*(1/v21/v1))/((2^0.5)*sigama))0.416*((h2.5+y*(1/v21/v1))/((2^0.5)*sigama))^2)))...
*(1/((2*pi)^0.5*theta)*exp(((v1vmu)/theta)^2))...
*(1/((2*pi)^0.5*theta)*exp(((v2vmu)/theta)^2))...
*(1/((2*pi)^0.5*hvar*h)*exp(((log(h)hmean)/theta)^2));
hmax=@(v1) 2.5+y*(1/v11/v2);
eff =eff + quad2d(F,1,120*5280/3600,0,hmax);
end
The error information:
??? Error using ==> mldivide
Matrix dimensions must agree.
Error in ==> @(v1)2.5+y*(1/v11/v2)
Error in ==> quad2d>tensor at 315
top = phiTvar(x);
Error in ==> quad2d at 169
[Qsub,esub] = tensor(thetaL,thetaR,phiB,phiT);
Error in ==> Linear_Searchv1 at 46
eff =eff + quad2d(F,1,120*5280/3600,0,hmax);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks a lot!
dhuan
