regionMargins function

Requirements.LinearAnalysis.regionMargins  · source

Icon of regionMargins

The signed distance of every mode (and its conjugate) to a polygon, positive inside

Extends Modelica.Icons.Function

For each of the first n modes, the signed distance of the eigenvalue re + j im and of its conjugate re - j im to the polygon polygon in the (Re, Im) plane, computed with Utilities.distancePointToPolygon (positive inside, negative outside); the smaller of the two is returned, so a mode is inside only if both members of its pair are. Entries beyond n are 0. Used by EigenvaluesWithinRegion and ModesWithinRegion.

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Inputs

NameTypeDescription
polygon[…] inputRealThe region's vertices (Re [1/s], Im [rad/s])
re[…] inputRealReal parts of the modes
im[…] inputRealImaginary parts of the modes
n inputIntegerThe number of valid modes (entries beyond n get 0)

Outputs

NameTypeDescription
m[…] outputRealSigned distance per mode to the polygon (positive inside)