Floor Icon
Mathematical.Floor
FloorA component that outputs the floor value of the input signal.
Description
The Floor block computes the floor of input u using the built-in floor() function. The floor operation returns the greatest integer less than or equal to u. It effectively rounds the input down toward negative infinity.
Variables
u(t): Input signaly(t): Output signal (floor of u)
Examples
- u = 3.7 → y = 3
- u = -2.3 → y = -3
- u = 0.0 → y = 0
This component extends from BlockComponents.SISO
Usage
PrimitiveComponents.Mathematical.Floor()
Connectors
u- This connector represents a real signal as an input to a component (RealInput)y- This connector represents a real signal as an output from a component (RealOutput)
Behavior
\[ \begin{align} y\left( t \right) &= \left\lfloor u\left( t \right)\right\rfloor \end{align} \]
Source
"""
Floor
A component that outputs the floor value of the input signal.
# Description
The Floor block computes the floor of input `u` using the built-in `floor()` function.
The floor operation returns the greatest integer less than or equal to `u`.
It effectively rounds the input down toward negative infinity.
# Variables
- `u(t)`: Input signal
- `y(t)`: Output signal (floor of u)
# Examples
- u = 3.7 → y = 3
- u = -2.3 → y = -3
- u = 0.0 → y = 0
"""
component Floor
extends BlockComponents.SISO
relations
y = floor(u)
metadata {
"Dyad": {
"experiments": {},
"tests": {},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"icons": {"default": "dyad://PrimitiveComponents/Floor.svg"},
"path": {},
"doc": {"behavior": true}
}
}
end
Flattened Source
"""
Floor
A component that outputs the floor value of the input signal.
# Description
The Floor block computes the floor of input `u` using the built-in `floor()` function.
The floor operation returns the greatest integer less than or equal to `u`.
It effectively rounds the input down toward negative infinity.
# Variables
- `u(t)`: Input signal
- `y(t)`: Output signal (floor of u)
# Examples
- u = 3.7 → y = 3
- u = -2.3 → y = -3
- u = 0.0 → y = 0
"""
component Floor
"Input signal port"
u = RealInput() {
"Dyad": {
"placement": {
"icon": {"iconName": "input", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0},
"diagram": {"iconName": "input", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
}
}
}
"Output signal port"
y = RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "output", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0},
"diagram": {"iconName": "output", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
}
}
}
relations
y = floor(u)
metadata {
"Dyad": {
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"experiments": {},
"tests": {},
"icons": {"default": "dyad://PrimitiveComponents/Floor.svg"},
"path": {},
"doc": {"behavior": true}
}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses