# How to draw double integral functions

by matinking
Tags: double, draw, functions, integral
 PF Gold P: 162 There's two problems that I can see right away (and perhaps more that I don't see). For one I'm guessing you're trying to make f a function of R and h? But you just leave them as symbolic objects. The second problem is that where you define the integrand, you need an extra "." integrand = @(r,a)(h.*sin(a)./((r.^2).*(r.^2+h.^2-2.*r.*h.*cos(a)))); If I understand what you're trying to do correctly then this should do it: f = @(h,R) quad2d(@(r,a)(h.*sin(a)./((r.^2).*(r.^2+h.^2-2.*r.*h.*cos(a)))),h,sqrt(R.^2+(R+h).^2),0,atan(R./(R+h))); ezsurf(f,[0.001,5]); When I ran it, there were a bunch of warnings but I think that may be due to a singularity in the integral you're evaluating.