user1018331
user1018331

Reputation: 143

matlab quadrature

I'm trying to use MATLAB dblquad for such an equation:

f(x,y)=\int_{0}^{1}(exp(-int_{0}^{y}f(x)dx))dy

f(x,y)=\int_{0}^{1}(exp(-int_{0}^{y}f(x)dx))dy

But it does not work. Is there any suitable MATLAB function for these type of double integrations?

Thanks a lot, mg

Upvotes: 1

Views: 552

Answers (1)

stardt
stardt

Reputation: 1219

You have a nested integral rather than a double integral so dblquad will not work. How about

q = quad(@(y)arrayfun(@(w)exp(-quad(f,0,w)),y),0,1)

Upvotes: 1

Related Questions