---
url: /dyad/stable/stdlib/MultibodyComponents/components/Mux3.md
description: >-
  Dyad Mux3 docs.  Bundle three scalar signals into a 3-element vector, y = [u1,
  u2, u3]. Used as an explicit multiplexer in the GUI so that downstream
  array-i...
---

# `Mux3` {#Mux3}

Bundle three scalar signals into a 3-element vector, `y = [u1, u2, u3]`. Used as an explicit multiplexer in the GUI so that downstream array-input blocks (e.g. `ControlMixer`) receive a single wire instead of three.

## Usage {#Usage}

`MultibodyComponents.Mux3()`

## Connectors {#Connectors}

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

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

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

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

## Behavior {#Behavior}

$$ \begin{align}
y\_{1}\left( t \right) &= \mathtt{u1}\left( t \right) \\
y\_{2}\left( t \right) &= \mathtt{u2}\left( t \right) \\
y\_{3}\left( t \right) &= \mathtt{u3}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
Bundle three scalar signals into a 3-element vector, `y = [u1, u2, u3]`.
Used as an explicit multiplexer in the GUI so that downstream array-input
blocks (e.g. `ControlMixer`) receive a single wire instead of three.
"""
component Mux3
  "First scalar input"
  u1 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 180, "x2": 0, "y2": 280, "rot": 0}
      },
      "tags": []
    }
  }
  "Second scalar input"
  u2 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Third scalar input"
  u3 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 720, "x2": 0, "y2": 820, "rot": 0}
      },
      "tags": []
    }
  }
  "3-element output vector"
  y = [RealOutput() for i in 1:3] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y[1] = u1
  y[2] = u2
  y[3] = u3
end
```

```dyad
"""
Bundle three scalar signals into a 3-element vector, `y = [u1, u2, u3]`.
Used as an explicit multiplexer in the GUI so that downstream array-input
blocks (e.g. `ControlMixer`) receive a single wire instead of three.
"""
component Mux3
  "First scalar input"
  u1 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 180, "x2": 0, "y2": 280, "rot": 0}
      },
      "tags": []
    }
  }
  "Second scalar input"
  u2 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Third scalar input"
  u3 = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 720, "x2": 0, "y2": 820, "rot": 0}
      },
      "tags": []
    }
  }
  "3-element output vector"
  y = [RealOutput() for i in 1:3] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y[1] = u1
  y[2] = u2
  y[3] = u3
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
