Code covered by the BSD License
Aravazhi Anbarasu (view profile)
15 Jan 2013
Simple and intuitive numerical integration based on trapezoidal rule.
Watch this File
Y = int_trapz(X,Ts,~InitCond)
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?