I have written a function feval that takes two arguments and spits out a number.
Now I wanted to use the command integral2 in order to integrate over my function feval(x,y).
The problem seems to be that integral2 thinks that I have a function that can take two arrays as arguments and apply pairwise operations on them. Unfortunately, this is not the case. My function can only works with 2 numbers and not with full arrays. Is there any standard method to make this work?
Actually, this is my code now and MATLAB claims that q = integral2( @(x,y) arrayfun(func_cross_scat,x,y),0,2*pi,0,pi); my function(feval, that i renamed func_cross_scat does not get enough input arguments)
.command where possible (vectorize)