Sqrt Icon
Mathematical.Sqrt
SqrtA component that computes the square root of a real-valued input signal.
Description
The Sqrt block computes the square root of input u, returning the non-negative root. The output y is defined as: y = √u (equivalently, y = u^(0.5)). For negative input values, the output becomes NaN since the square root of a negative number is not defined in the real domain.
Variables
u(t): Input signaly(t): Output signal (square root of u)
Examples
- u = 9 → y = 3
- u = 0 → y = 0
- u = 2.25 → y = 1.5
- u = -4 → y = NaN (undefined for negative input)
This component extends from BlockComponents.SISO
Usage
PrimitiveComponents.Mathematical.Sqrt()
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) &= \sqrt{u\left( t \right)} \end{align} \]
Source
"""
Sqrt
A component that computes the square root of a real-valued input signal.
# Description
The Sqrt block computes the square root of input `u`, returning the non-negative root.
The output `y` is defined as: y = √u (equivalently, y = u^(0.5)).
For negative input values, the output becomes `NaN` since the square root
of a negative number is not defined in the real domain.
# Variables
- `u(t)`: Input signal
- `y(t)`: Output signal (square root of u)
# Examples
- u = 9 → y = 3
- u = 0 → y = 0
- u = 2.25 → y = 1.5
- u = -4 → y = NaN (undefined for negative input)
"""
component Sqrt
extends BlockComponents.SISO
relations
y = sqrt(u)
metadata {
"Dyad": {
"experiments": {},
"tests": {},
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"icons": {"default": "dyad://PrimitiveComponents/Sqrt.svg"},
"path": {},
"doc": {"behavior": true}
}
}
end
Flattened Source
"""
Sqrt
A component that computes the square root of a real-valued input signal.
# Description
The Sqrt block computes the square root of input `u`, returning the non-negative root.
The output `y` is defined as: y = √u (equivalently, y = u^(0.5)).
For negative input values, the output becomes `NaN` since the square root
of a negative number is not defined in the real domain.
# Variables
- `u(t)`: Input signal
- `y(t)`: Output signal (square root of u)
# Examples
- u = 9 → y = 3
- u = 0 → y = 0
- u = 2.25 → y = 1.5
- u = -4 → y = NaN (undefined for negative input)
"""
component Sqrt
"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 = sqrt(u)
metadata {
"Dyad": {
"labels": [
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"experiments": {},
"tests": {},
"icons": {"default": "dyad://PrimitiveComponents/Sqrt.svg"},
"path": {},
"doc": {"behavior": true}
}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses