Code covered by the BSD License
by Aravazhi Anbarasu
15 Jan 2013
Simple and intuitive numerical integration based on trapezoidal rule.
| Watch this File
Y = int_trapz(X,Ts,~InitCond) Input X = Input data Ts = Sampling Time/Integration Time InitCond = Optional argument, Else X(1)taken as initial condition.
Its more intuitive and allows initial conditons.Its more similar to using cumtrapz.Limits are it doesnt allow non-uniform sampling.
Do you claim any improvements over Matlab's built-in trapz function? If not, why bother?
Contact us