diff --git a/wpimath/src/main/native/include/frc/system/Discretization.h b/wpimath/src/main/native/include/frc/system/Discretization.h index 957b875433f..16fb45a20ed 100644 --- a/wpimath/src/main/native/include/frc/system/Discretization.h +++ b/wpimath/src/main/native/include/frc/system/Discretization.h @@ -44,9 +44,9 @@ void DiscretizeAB(const Matrixd& contA, // M = [A B] // [0 0] Matrixd M; - M.setZero(); M.template block(0, 0) = contA; M.template block(0, States) = contB; + M.template block(States, 0).setZero(); // ϕ = eᴹᵀ = [A_d B_d] // [ 0 I ]