#ifndef IGL_MATLAB_FORMAT_H #define IGL_MATLAB_FORMAT_H #include "igl_inline.h" #include #include #include namespace igl { // This is a routine to print a matrix using format suitable for pasting into // the matlab IDE // // Templates: // DerivedM e.g. derived from MatrixXd // Input: // input some matrix to be formated // name name of matrix // Returns Formated matrix // // Example: // // M := [1 2 3;4 5 6]; // cout< IGL_INLINE const Eigen::WithFormat< DerivedM > matlab_format( const Eigen::PlainObjectBase & M, const std::string name = ""); // Same but for sparse matrices. Print IJV format into an auxillary variable // and then print a call to sparse which will construct the sparse matrix // Example: // // S := [0 2 3;4 5 0]; // cout< IGL_INLINE const std::string matlab_format( const Eigen::SparseMatrix & S, const std::string name = ""); // Return just IOFormat // // Example: // // M := [1 2 3;4 5 6]; // cout<