Euler Step of a State-Space Model

~8 mincode completion

Implement euler_step(A, B, x, u, dt) returning the next state as an array.

Where this shows up

~8 min

6 employers weight this skill

4 autonomy companies, 2 defense companies. Top match scores 93.

Python
import numpy as np


def euler_step(A, B, x, u, dt):
    """
    One forward Euler step of dx/dt = A x + B u.

    Args:
        A:  state matrix, shape (n, n)
        B:  input matrix, shape (n, m)
        x:  current state, shape (n,)
        u:  current command, shape (m,)
        dt: time step

    Returns:
        array of shape (n,): the next state
    """
    # YOUR CODE HERE
    pass
Loading docs…

The AI Mentor needs an account

It reads your code and the failing tests and nudges you toward the fix without handing you the answer. Free accounts get it on every problem you're working on today.