# .Modelica.Blocks.Math

## Information

This package contains basic mathematical operations, such as summation and multiplication, and basic mathematical functions, such as sqrt and sin, as input/output blocks. All blocks of this library can be either connected with continuous blocks or with sampled-data blocks.

## Contents

NameDescription
UnitConversionsConversion blocks to convert between SI and non-SI unit signals
InverseBlockConstraintsConstruct inverse model by requiring that two inputs and two outputs are identical
GainOutput the product of a gain value with the input signal
MatrixGainOutput the product of a gain matrix with the input signal vector
MultiSumSum of Reals: y = k*u + k*u + ... + k[n]*u[n]
MultiProductProduct of Reals: y = u*u* ... *u[n]
MultiSwitchSet Real expression that is associated with the first active input signal
SumOutput the sum of the elements of the input vector
FeedbackOutput difference between commanded and feedback input
AddOutput the sum of the two inputs
Add3Output the sum of the three inputs
ProductOutput product of the two inputs
DivisionOutput first input divided by second input
AbsOutput the absolute value of the input
SignOutput the sign of the input
SqrtOutput the square root of the input (input >= 0 required)
SinOutput the sine of the input
CosOutput the cosine of the input
TanOutput the tangent of the input
AsinOutput the arc sine of the input
AcosOutput the arc cosine of the input
AtanOutput the arc tangent of the input
Atan2Output atan(u1/u2) of the inputs u1 and u2
SinhOutput the hyperbolic sine of the input
CoshOutput the hyperbolic cosine of the input
TanhOutput the hyperbolic tangent of the input
ExpOutput the exponential (base e) of the input
PowerOutput the power to a base of the input
LogOutput the logarithm (default base e) of the input (input > 0 required)
Log10Output the base 10 logarithm of the input (input > 0 required)
WrapAngleWrap angle to interval ]-pi,pi] or [0,2*pi[
RealToIntegerConvert Real to Integer signal
IntegerToRealConvert Integer to Real signals
BooleanToRealConvert Boolean to Real signal
BooleanToIntegerConvert Boolean to Integer signal
RealToBooleanConvert Real to Boolean signal
IntegerToBooleanConvert Integer to Boolean signal
RectangularToPolarConvert rectangular coordinates to polar coordinates
PolarToRectangularConvert polar coordinates to rectangular coordinates
MeanCalculate mean over period 1/f
RectifiedMeanCalculate rectified mean over period 1/f
ContinuousMeanCalculates the empirical expectation (mean) value of its input signal
RootMeanSquareCalculate root mean square over period 1/f
VarianceCalculates the empirical variance of its input signal
StandardDeviationCalculates the empirical standard deviation of its input signal
HarmonicCalculate harmonic over period 1/f
TotalHarmonicDistortionOutput the total harmonic distortion (THD)
RealFFTSampling and FFT of input u
PythagorasDetermine the hypotenuse or leg of a right triangle
MaxPass through the largest signal
MinPass through the smallest signal
MinMaxOutput the minimum and the maximum element of the input vector
LinearDependencyOutput a linear combination of the two inputs
EdgeIndicates rising edge of Boolean signal
BooleanChangeIndicates Boolean signal changing
IntegerChangeIndicates integer signal changing

## Revisions

• August 24, 2016 by Christian Kral: added WrapAngle
• October 21, 2002 by Martin Otter and Christian Schweiger:
New blocks added: RealToInteger, IntegerToReal, Max, Min, Edge, BooleanChange, IntegerChange.
• August 7, 1999 by Martin Otter:
Realized (partly based on an existing Dymola library of Dieter Moormann and Hilding Elmqvist).

Generated at 2023-06-05T00:32:50Z by OpenModelicaOpenModelica 1.22.0~dev-51-ge506fbc using GenerateDoc.mos