I need your help on this problem. I am new to Matlab and still building my skills. Here is issue. I want to double integrate the following:
theta limits = [0,pi/2] phi limits = [0,2*pi]
k is a variable that ranges from N:M
function = cos(k.*sin(theta).*cos(phi))
I want to double integrate the above function with respect to theta and phi limits. I need to repeat the integration every time k change its value based on the k range above.
dblquad works if k has one value but I couldn't use it with k range. Any help would be highly appreciated.