Function reference · Math

tri

Computes a triangular pulse centered at zero.

tri(x) returns 1-|x| when |x|<1 and 0 when |x|>=1. Unresolved symbolic inputs remain as tri(x).

Examples

These examples use Nerdamer Notation.

Evaluate the peak of the triangular pulse.

tri(0)
// → 1

Evaluate an interior point exactly.

tri(1/4)
// → 3/4

Return zero at the boundary.

tri(1)
// → 0

Keep an unresolved symbolic input unevaluated.

tri(x)
// → tri(x)

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

tri(arg1)

nerdamer.tri

Call the operation through the default nerdamer import.

nerdamer.tri(x: ExpressionInput): Expression

Parameters

NameTypeDescription
xExpressionInput—

Returns

Expression

Browse the nerdamer API →

← Back to Function reference