How to draw double integral functions

1. Feb 14, 2012

matinking

Hi every one!

I would like to draw a double integral function in related to R and h parameters by below M-File but It does goes wrong!!!
Is there any one to correct it for me???
thank you

syms R h;

a1 = 0;

a2 = atan(R./(R+h));

r1 = h;
r2 = sqrt(R.^2+(R+h).^2);

integrand = @(r,a)(h.*sin(a)/((r.^2).*(r.^2+h.^2-2.*r.*h.*cos(a))));

ezsurf(f,[0.001,5]);

2. Feb 14, 2012

kai_sikorski

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 "."

Code (Text):
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:
Code (Text):