Good day,
this seems to be a regular question topic; I unfortunately am not sure I have the correct understanding from the help files or description of the use of trapz.
I have a vector 'time' with a series of non-uniformly spaced time data points.
I have vectors 'P' and 'At' which are independant data points known at each specific time.
So I want to calculate the integral of (P x At dtime).
Is the correct use and/or most accurate use of trapz in this regard as follows:
Cstar_eff = trapz(time,(P.*At))
Best Answer