---
url: /dyad/dev/stdlib/MultibodyComponents/components/Demux4.md
description: >-
  Dyad Demux4 docs.  Split a 4-element vector into four scalar outputs. Used
  inside RotorCraft to route the array-typed thrust-command input u to each
  thruster's...
---

# `Demux4` {#Demux4}

Split a 4-element vector into four scalar outputs. Used inside `RotorCraft` to route the array-typed thrust-command input `u` to each thruster's scalar `thrust` input through a labelled port.

## Usage {#Usage}

`MultibodyComponents.Demux4()`

## Connectors {#Connectors}

* `u_in` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `y1` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

* `y2` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

* `y3` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

* `y4` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{y1}\left( t \right) &= \mathtt{u_in}\_{1}\left( t \right) \\
\mathtt{y2}\left( t \right) &= \mathtt{u_in}\_{2}\left( t \right) \\
\mathtt{y3}\left( t \right) &= \mathtt{u_in}\_{3}\left( t \right) \\
\mathtt{y4}\left( t \right) &= \mathtt{u_in}\_{4}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Split a 4-element vector into four scalar outputs. Used inside `RotorCraft`
to route the array-typed thrust-command input `u` to each thruster's scalar
`thrust` input through a labelled port.
"""
component Demux4
  "4-element input vector"
  u_in = [RealInput() for i in 1:4] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 1 (= u_in[1])"
  y1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 80, "x2": 1100, "y2": 180, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 2 (= u_in[2])"
  y2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 340, "x2": 1100, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 3 (= u_in[3])"
  y3 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 570, "x2": 1100, "y2": 670, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 4 (= u_in[4])"
  y4 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 800, "x2": 1100, "y2": 900, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y1 = u_in[1]
  y2 = u_in[2]
  y3 = u_in[3]
  y4 = u_in[4]
end
```

```dyad
"""
Split a 4-element vector into four scalar outputs. Used inside `RotorCraft`
to route the array-typed thrust-command input `u` to each thruster's scalar
`thrust` input through a labelled port.
"""
component Demux4
  "4-element input vector"
  u_in = [RealInput() for i in 1:4] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 1 (= u_in[1])"
  y1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 80, "x2": 1100, "y2": 180, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 2 (= u_in[2])"
  y2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 340, "x2": 1100, "y2": 440, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 3 (= u_in[3])"
  y3 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 570, "x2": 1100, "y2": 670, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 4 (= u_in[4])"
  y4 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 800, "x2": 1100, "y2": 900, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y1 = u_in[1]
  y2 = u_in[2]
  y3 = u_in[3]
  y4 = u_in[4]
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
