SquaretimesSign
Output the squared input and retain the same sign of it
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
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_blockSize | blockSize | Scalar | ||
mo_nin | nin | Number of inputs | Scalar | |
mo_nout | nout | Number of outputs | Scalar |
Name | Label | Description | Data Type | Valid 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' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
u | implicit | Connector of Real input signals | input | 1 |
y | implicit | Connector of Real output signals | output | 1 |