how to integrate a discrete function ?
Show older comments
i want to integrate a function in form of x*c*x' . c is a 5*5 constant matrix . x is a 1*5 vector which is actually a row of a 4000*5 matrix y that would indicate value of every element of x at each time step ( 4000 time steps as t=0:0.01:39.99 ). at the end in a plot it must be shown value of this integral in correspondence to t . there is no way to interpolate an analytical function to any column of y . cumtrapz gives a cumulative result and trapz gives nonthing since at every time step x*c*x' produces just a scalar value. is there any way to make this right ?
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!