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?

Réponses (0)

Cette question est clôturée.

Question posée :

le 10 Juin 2016

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by