Error with ’quad‘!!!Doubleintegral?

조회 수: 2 (최근 30일)
wang
wang 2013년 1월 31일
L = 3.128438e+003
B= 16685
X = 2.085625e+003
Y = 0
Z = 0
Quad_1 = @(Zeta,Xi) exp(-sqrt(Xi.^2 + Zeta.^2 + Z^2))./(-sqrt(Xi.^2 + Zeta.^2 + Z^2));
T_1 = quad(@(Zeta) Quad_1,Y-B,Y+B);
T_2 = @(Xi) exp(-Xi)*T_1;
T = quad(@(Xi) T_2(Xi), X-L, X+L);
disp(T);
Error using ==> quad at 80
The integrand function must return an output vector of the same length as the input vector
Error in ==> stationaer at 75
T_1 = quad(@(Zeta) Quad_1,Y-B,Y+B);
Can anyone help me to correct the errors? Thanks.
Jack

답변 (2개)

bym
bym 2013년 2월 1일
how about this
L = 3.128438e+003;
B= 16685;
X = 2.085625e+003;
Y = 0;
Z = 0;
Quad_1 = @(Zeta,Xi) exp(-sqrt(Xi.^2 + Zeta.^2 + Z^2))./(-sqrt(Xi.^2 + Zeta.^2 + Z^2));
%T_1 = quad(@(Zeta) Quad_1,Y-B,Y+B);
%T_2 = @(Xi) exp(-Xi)*T_1;
%T = quad(@(Xi) T_2(Xi), X-L, X+L);
T = dblquad(Quad_1,Y-B,Y+B,X-L,X+L);
disp(T);
  댓글 수: 1
wang
wang 2013년 2월 1일
thanks for your answer. but the equa, that i want to have is like:
integral[_ exp(-Xi)*_integral{ exp(-sqrt(Xi^2 + Zeta^2 + Z^2))/(-sqrt(Xi^2 + Zeta^2 + Z^2))} ]
there is an exp(-Xi) before the second integral.

댓글을 달려면 로그인하십시오.


wang
wang 2013년 2월 1일
thanks for your answer. but the equa, that i want to have is like:
integral[_ exp(-Xi)*_integral{ exp(-sqrt(Xi^2 + Zeta^2 + Z^2))/(-sqrt(Xi^2 + Zeta^2 + Z^2))} ]
there is an exp(-Xi) before the second integral.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by