---
url: /dyad/stable/stdlib/MultibodyComponents/components/Selector.md
description: Dyad Selector docs.  MultibodyComponents.Selector()
---

# `Selector` {#Selector}

## Usage {#Usage}

`MultibodyComponents.Selector()`

## Parameters: {#Parameters:}

|    Name | Description | Units | Default value |
| -------:| -----------:| -----:| -------------:|
|    `nu` |             |     – |             1 |
| `index` |             |     – |             1 |

## Connectors {#Connectors}

* `u` - 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\left( t \right) &= u\_{1}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
component Selector
  u = [Dyad.RealInput() for i in 1:nu] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  y = Dyad.RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter nu::Integer = 1
  structural parameter index::Integer = 1
relations
  y = u[index]
metadata {
  "Dyad": {
    "experiments": {},
    "tests": {},
    "labels": [
      {
        "label": "[$(index)]",
        "x": 500,
        "y": 970,
        "rot": 0,
        "layer": "all",
        "attrs": {
          "fill": "black",
          "font-size": "20",
          "dominant-baseline": "central",
          "text-anchor": "middle"
        }
      }
    ],
    "icons": {"default": "dyad://MultibodyComponents/Selector.svg"},
    "path": {},
    "doc": {"behavior": true}
  }
}
end
```

```dyad
component Selector
  u = [Dyad.RealInput() for i in 1:nu] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  y = Dyad.RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  structural parameter nu::Integer = 1
  structural parameter index::Integer = 1
relations
  y = u[index]
metadata {
  "Dyad": {
    "experiments": {},
    "tests": {},
    "labels": [
      {
        "label": "[$(index)]",
        "x": 500,
        "y": 970,
        "rot": 0,
        "layer": "all",
        "attrs": {
          "fill": "black",
          "font-size": "20",
          "dominant-baseline": "central",
          "text-anchor": "middle"
        }
      }
    ],
    "icons": {"default": "dyad://MultibodyComponents/Selector.svg"},
    "path": {},
    "doc": {"behavior": true}
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
