---
url: /dyad/stable/stdlib/DiscreteComponents/components/Examples.Mux.md
description: Dyad Examples.Mux docs.  DiscreteComponents.Examples.Mux()
---

# `Examples.Mux` {#Examples.Mux}

## Usage {#Usage}

`DiscreteComponents.Examples.Mux()`

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

* `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)
\end{align}
$$

## Source {#Source}

```dyad
component Mux
  u1 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 0, "y1": 200, "x2": 80, "y2": 280, "rot": 0}
      },
      "tags": []
    }
  }
  u2 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 0, "y1": 720, "x2": 80, "y2": 800, "rot": 0}
      },
      "tags": []
    }
  }
  y = [Dyad.RealOutput() for i in 1:2] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 460, "x2": 1080, "y2": 540, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y = [u1, u2]
end
```

```dyad
component Mux
  u1 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 0, "y1": 200, "x2": 80, "y2": 280, "rot": 0}
      },
      "tags": []
    }
  }
  u2 = Dyad.RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 0, "y1": 720, "x2": 80, "y2": 800, "rot": 0}
      },
      "tags": []
    }
  }
  y = [Dyad.RealOutput() for i in 1:2] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 460, "x2": 1080, "y2": 540, "rot": 0}
      },
      "tags": []
    }
  }
relations
  y = [u1, u2]
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
