I have to compute the average of a given parameter, i.e. I have to solve an equation of the type
average_y(x) = A * integral( x^a * y * dx)
where a and A are constants and, as shown, y is a function of x. This equation can be written in the form
d/dx (average_y(x)) = A * x^a * y
What form can be better solved with Matlab? Should I use the first form (with trapz or quad for example)? Or the second form with an ode-function (like ode45)? Please tell me what function you would use regarding the method you choose.
Thanks for your help.
Tibo
Best Answer