Multiple nested integrals produces scalar error
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hi,
I am trying to integrated nested integrals of the following form:
pmax = @(x,y) y;
pmin = 0;
ymax = 1;
ymin = @(x) x;
xmax = 1;
xmin = 0;
s_min = 0;
s_max = lam;
t_min = 0;
t_max = pi;
eqn = integral(@(x) x.*integral(@(y) (1/y).*integral(@(p) (exp(-arrayfun(@(p,x,y)integral2(@(s,t)myfun(s,t,p,x,y),s_min,s_max,t_min,t_max),p,x,y)./(k.*T))),pmin,pmax,'Arrayvalued',true),ymin,ymax,'Arrayvalued',true),xmin,xmax,'Arrayvalued',true)
However, I get the error:
Error using integral (line 85) A and B must be floating point scalars.
I thought by adding 'Arrayvalued' for the single integrals and arrayfun for the double integral that this would not be a problem. Any idea why this isn't working?
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!