pub fn controllability_matrix( a: &[f64], b: &[f64], n: usize, m: usize, ) -> Vec<f64>
Compute the controllability matrix [B, AB, A^2B, …].
a is n-by-n, b is n-by-m (flat row-major). Returns n-by-(n*m).
a
b