I need to compute the integral $\int_{\mathbb{R}^3}f(x)\, dx$, where $f$ is a matrix-valued function $f:\mathbb{R}^3\to\mathbb{R}^{3\times 3}$. How do I do that using MATLAB? The function $f$ is implemented in a seperate file. It takes as input three vectors, giving the $x$-, $y$-, and $z$-coordinates of the points in which is has to be evaluated. As output it gives a 5D array.
If I just write integral3(@f,-1,1,-1,1,-1,1)
for instance, I get the error Integrand output size does not match the input size.
integral3
should take three 2D arrays, which in my opinion seems a little strange. And my function take three vectors. $\endgroup$