Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

simps

Integrates a given vector of values with Simpson's rule (perfect for third order polynomials, i.e. cubic functions).

References

simps(y,x)

Computes the integral for a given range of y values with its x vector.

Argument y

Matrix

Argument x

Matrix

Returns 1. entry

Scalar

Example

simps(sin(0:0.1:Pi), 0:0.1:Pi)

Computes the value of the sinus function between 0 and pi (analytic result is 2).

Clone this wiki locally