I have a function that changes by loop , as below
f(x,y)=(i-1)*x+(j-1)*y
g(x,y)=(i+1)*x+(j+1)*y
The real function is more Complex than this, however/
I want to calculate the integration of f(x,y)*g(x,y)
when i
& j
are changed by the loop.
I want to calculate like below in matlab
, but this code isn't correct.
for i=1:n
for j=1:n
h=@(x,y)(f*g) % f & g are functions
int=integral2(h,xmin,xmax,ymin,ymax);
end
end
function m=f(x,y,i,j)
m=(i-1)*x+(j-1)*y
end