SquaretimesSign

Output the squared input and retain the same sign of it

    SquaretimesSign

Library

PlanarMechanics/Utilities/Blocks

Description

This block outputs squared input real signal whereby the signof the output is the same as input.The size of input u and output y are defined bya parameter blockSize, thus

for i in 1:blockSize loop  y[i] = sign(u[i]) * u[i]^2;end for;

Parameters

SquaretimesSign_0

NameLabelDescriptionData TypeValid Values

mo_blockSize

blockSize

Scalar

mo_nin

nin

Number of inputs

Scalar

mo_nout

nout

Number of outputs

Scalar

SquaretimesSign_1

NameLabelDescriptionData TypeValid Values

mo__nmodifiers

Number of Modifiers

Specifies the number of modifiers

Number

mo__modifiers

Modifiers

Add new modifier

Structure

mo__modifiers/varname

Variable name

Cell of strings

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

Connector of Real input signals

input

1

y

implicit

Connector of Real output signals

output

1

See Also