---
url: /dyad/stable/stdlib/MultibodyComponents/components/Demux6.md
description: >-
  Dyad Demux6 docs.  Split a 6-element vector into six scalar outputs. Used in
  ControlledRotorCraft to expose the six elements of RotorCraft.y_pos ([alt,
  roll, p...
---

# `Demux6` {#Demux6}

Split a 6-element vector into six scalar outputs. Used in `ControlledRotorCraft` to expose the six elements of `RotorCraft.y_pos` (\[alt, roll, pitch, yaw, forward, sideways]) as labelled scalar ports.

## Usage {#Usage}

`MultibodyComponents.Demux6()`

## 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))

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

* `y6` - 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) \\
\mathtt{y5}\left( t \right) &= \mathtt{u_in}\_{5}\left( t \right) \\
\mathtt{y6}\left( t \right) &= \mathtt{u_in}\_{6}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Split a 6-element vector into six scalar outputs. Used in
`ControlledRotorCraft` to expose the six elements of `RotorCraft.y_pos`
([alt, roll, pitch, yaw, forward, sideways]) as labelled scalar ports.
"""
component Demux6
  "6-element input vector"
  u_in = [RealInput() for i in 1:6] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 1 (= u_in[1]; semantically: altitude when used on y_pos)"
  y1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 50, "x2": 1100, "y2": 150, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 2 (= u_in[2]; semantically: roll when used on y_pos)"
  y2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 210, "x2": 1100, "y2": 310, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 3 (= u_in[3]; semantically: pitch when used on y_pos)"
  y3 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 370, "x2": 1100, "y2": 470, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 4 (= u_in[4]; semantically: yaw when used on y_pos)"
  y4 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 530, "x2": 1100, "y2": 630, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 5 (= u_in[5]; semantically: forward when used on y_pos)"
  y5 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 690, "x2": 1100, "y2": 790, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 6 (= u_in[6]; semantically: sideways when used on y_pos)"
  y6 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 850, "x2": 1100, "y2": 950, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y1 = u_in[1]
  y2 = u_in[2]
  y3 = u_in[3]
  y4 = u_in[4]
  y5 = u_in[5]
  y6 = u_in[6]
end
```

```dyad
"""
Split a 6-element vector into six scalar outputs. Used in
`ControlledRotorCraft` to expose the six elements of `RotorCraft.y_pos`
([alt, roll, pitch, yaw, forward, sideways]) as labelled scalar ports.
"""
component Demux6
  "6-element input vector"
  u_in = [RealInput() for i in 1:6] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 1 (= u_in[1]; semantically: altitude when used on y_pos)"
  y1 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 50, "x2": 1100, "y2": 150, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 2 (= u_in[2]; semantically: roll when used on y_pos)"
  y2 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 210, "x2": 1100, "y2": 310, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 3 (= u_in[3]; semantically: pitch when used on y_pos)"
  y3 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 370, "x2": 1100, "y2": 470, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 4 (= u_in[4]; semantically: yaw when used on y_pos)"
  y4 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 530, "x2": 1100, "y2": 630, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 5 (= u_in[5]; semantically: forward when used on y_pos)"
  y5 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 690, "x2": 1100, "y2": 790, "rot": 0}
      },
      "tags": []
    }
  }
  "Scalar output 6 (= u_in[6]; semantically: sideways when used on y_pos)"
  y6 = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 850, "x2": 1100, "y2": 950, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y1 = u_in[1]
  y2 = u_in[2]
  y3 = u_in[3]
  y4 = u_in[4]
  y5 = u_in[5]
  y6 = u_in[6]
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
