I have a function X_t which I have defined anonymously to take as variables t which is a scalar time and z which is a vector of potentially arbitrary dimension.
That is,
X_t = @(t,z) fun(t,z).
I want to find the integral L2
norm of this object over the space of z's. That is, I want to find
X_t_norm = @(t) integral(@(z) abs(X_t(t,z))^2, -infinity,infinity).
Now clearly two things are a problem here.
Firstly, taking the limits as infinite isn't going to work, but I think I should be fine to take the limits as just large numbers (100 would certainly be enough for my purposes).
However, the real problem comes with taking this integral. My variable z
is a vector of somewhat arbitrary (even) dimension and as a result I've gotten stuck figuring out how to pass z
into the integral in such a way that I can compute this n-dimensional integral. (Basically I want to vary the length of z
for different cases and compute the L2
norm for each of these cases).
In particular, I'm not sure how to tell the integral function to compute the integral over every component of z between the limits discussed above.
Any help would be greatly appreciated!