Regulate an Inverted Pendulum
In this classic control systems problem, a controller is designed to stabilize a system about an unstable equilibrium. The inverted pendulum is linearized about the vertical position. StateFeedbackGains gives a matrix, which can be thought of as a controller, that places the poles of the system in the left half of the complex plane. The closed-loop system is then simulated twice.