---
url: /dyad/dev/stdlib/MultibodyComponents/examples/examples.CartWithInput.md
description: >-
  Dyad examples.CartWithInput docs.  Cartpole driven in open loop by a cosine
  force signal.
---

# `examples.CartWithInput` {#examples.CartWithInput}

Cartpole driven in open loop by a cosine force signal.

## Usage {#Usage}

`MultibodyComponents.examples.CartWithInput()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"Cartpole driven in open loop by a cosine force signal."
example component CartWithInput
  world = MultibodyComponents.World()
  cartpole = Cartpole()
  input = BlockComponents.Sources.Cosine(frequency = 1, amplitude = 1)
relations
  connect(input.y, cartpole.u)
end
```

```dyad
"Cartpole driven in open loop by a cosine force signal."
example component CartWithInput
  world = MultibodyComponents.World()
  cartpole = Cartpole()
  input = BlockComponents.Sources.Cosine(frequency = 1, amplitude = 1)
relations
  connect(input.y, cartpole.u)
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
