modelTrapezoidalIntegration

Tests the correct implementation of the function trapezoidalIntegration

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Tests the correct implementation of function Buildings.Utilities.Math.Functions.trapezoidalIntegration.

Integrands y1[7]={72, 70, 64, 54, 40, 22, 0} are the function values of y = -2*x^2-72 for x = {0,1,2,3,4,5,6}. The trapezoidal integration over the 7 integrand points should give a result of 286.

Components

TypeNameDefaultDescription
Real[7]y1{72, 70, 64, 54, 40, 22, 0}
RealyIntegration result

Revisions

  • January 8, 2014, by Marcus Fuchs:
    First implementation.