Skip to content

Instantly share code, notes, and snippets.

View tienviitta's full-sized avatar

Petri Väisänen tienviitta

  • Tienviitta
  • Kempele, Finland
View GitHub Profile
@tienviitta
tienviitta / eigen_matlab.cpp
Created May 5, 2023 06:16 — forked from phg1024/eigen_matlab.cpp
Eigen-MATLAB reference
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.