Multiple nested integrals produces scalar error
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
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?
Risposte (0)
Questa domanda è chiusa.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!