Pythagoras - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Pythagoras

Determines the hypotenuse or leg of a right triangle

 

Description

Equations

Connections

Parameters

Modelica Standard Library

Description

The Pythagoras component computes the length of the third side of a right angle triangle.

If parameter u1 is hypotenuse is false, then y is the length of the hypotenuse, otherwise u1 is the length of the hypotenuse.

Equations

{valid=true,y2=u12+u22,y=y2¬u1 is hypotenusey2=u12u22,{valid=true,y=y20y2valid=false,y=0otherwise

Connections

Name

Description

Modelica ID

u1

Real input signal

u1

u2

Real input signal

u2

y

Real output signal

y

valid

Boolean output signal; true when y is a valid result

valid

Parameters

Name

Default

Units

Description

Modelica ID

u1 is hypotenuse

false

 

If true, u1 is the hypotenuse and y is one leg

u1IsHypotenuse

Modelica Standard Library

The component described in this topic is from the Modelica Standard Library. To view the original documentation, which includes author and copyright information, click here.

See Also

Math Functions

Math Operators

Signal Blocks