| MATLAB | Eigen with libigl | Notes | 
|---|---|---|
|  |  | MATLAB version allows Y to be a multidimensional matrix, but the Eigen version is only for 1D or 2D matrices. | 
|  |  | MATLAB version would allow w and h to be non-positive since the colon operator evaluates to a list of indices, but the Eigen version needs non-negative width and height values. | 
|  |  | Find the maximum coefficient over all entries of the matrix. | 
|  |  | Find the minimum coefficient over all entries of the matrix. | 
|  |  | |
|  |  | |
|  |  | Matlab supports finding subscripts (I and J) as well as indices (just I), but so far igl::find only supports subscripts. Also, igl::find requires X to be sparse. | 
|  |  | |
|  |  | Currently the igl version only supports sparse matrix input (and
            dim must be 1 or 2). For sparse matrices, one could use A*Matrix<Atype,Dynamic,1>::Ones(A.cols(),1);but this
            will not work as expected forSparseMatrix<bool>. | 
|  |  | Extract the main diagonal of a matrix. Currently igl version supports sparse only. | 
|  |  | Construct new square matrix M with entries of vector D along the
        diagonal. Currently igl version supports sparse only. Might also
        consider simply: M = D.asDiagonal(); | 
|  |  | Matlab has a bizarre convention of passing [] as the second argument to mean take the max/min along dimension dim. | 
|  |  | Matlab allows you to obtain the indices of extrema see mat_max | 
|  |  | |
|  |  | |
|  |  | |
|  |  | Do not attempt to combine .transpose() in expression like
        this:  | 
|  |  | Do not attempt to use A in constructor of A_LLT like
        this: Do not attempt to use A_LLT.succeeded() to determine if Cholesky factorization succeeded, like this:  | 
|  |  | Expects that L and U are lower and upper triangular matrices respectively | 
|  |  | igl::repmat is also implemented for Sparse Matrices. | 
|  |  | IGL version should be templated enough to handle same situations as matlab's colon. The matlab keyword end does not correspond in the C++ version. You'll have to use M.size(),M.rows() or whatever. | 
|  |  | |
|  |  | |
|  |  | This is only for the case when I and J are lists of indices and not vectors of logicals. | 
|  |  | This is only for the case when I and J are lists of indices and not vectors of logicals. | 
|  |  | |
|  |  | If FUN is templated, the templates must be fully resolved. | 
|  |  | The .eval()is not necessary if A != B | 
|  |  | Where IM is an "index map" column vector and A is an arbitrary
        matrix. The .eval()is not necessary if A != B, but then
        the second option should be used. | 
|  |  | IJV and A should not be empty! (this might be fixed) | 
|  |  | Coefficient-wise minimum of matrix and scalar (or matching size matrix) | 
|  |  | Where I is a vector of increasing indices from 0 to n, and P is a vector. Requires C++11 and #include <algorithm> | 
|  |  | |
|  |  | Casts Matrix::Scalar | 
|  |  | |
|  |  | |
|  |  | Remove the diagonal from a sparse matrix. | 
|  |  | Remove the diagonal from a sparse matrix. |