numerically integrate f(x) in matlab
July 18th, 2006 by Lawrence David
let’s say you’ve got y = f(x), where x and y are both matlab arrays.
to numerically integrate f(x), just use the command trapz:
>> area_under_the_curve = trapz(x,y);
July 18th, 2006 by Lawrence David
let’s say you’ve got y = f(x), where x and y are both matlab arrays.
to numerically integrate f(x), just use the command trapz:
>> area_under_the_curve = trapz(x,y);