How to implement integration of an array in MATLAB?

1 次查看(过去 30 天)
I have been using cumtrapz for integrating an array. However, the function I am integrating is a cosine wave and it is expressed by an array. Can I use any other command or code that uses any other method for integration? I am not sure whether any other method is available? If so, how to implement that?
  2 个评论
Torsten
Torsten 2022-10-30
编辑:Torsten 2022-10-30
I have been using cumtrapz for integrating an array. However, the function I am integrating is a cosine wave and it is expressed by an array.
So cumtrapz should be well-suited, shouldn't it ?
J. Alex Lee
J. Alex Lee 2022-10-31
i'm pretty sure i have seen implementations of simpson's rule on FEX. It would be pretty easy to code up a generalized Newton-Cotes methods, and probably start with FEX too

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by