I am trying to write a system of n nonlinear equations in Matlab. These functions are basically written as the integral of a product of exponentials.
I tried doing this with a for-loop and integrating the whole thing thanks to 'trapz' but the 'fsolve' doesn't find the solutions, and I checked the values given by 'trapz' : they are not sufficiently precise.
I want to use 'quad' or other methods to integrate, but the input argument has to be a function, so how can I create a list (or a matrix) of functions, for example function handles or splines, and then multiply them, directly or with a loop?
Thank you for your help, don't hesitate if it is not clear, I will give more details if necessary.