{"id":18574852,"url":"https://github.com/smorodov/matlabtoeigencheatsheet","last_synced_at":"2026-03-19T05:07:33.262Z","repository":{"id":232768159,"uuid":"785148205","full_name":"Smorodov/MATLABtoEigenCheatsheet","owner":"Smorodov","description":"MATLAB to Eigen cheatsheet","archived":false,"fork":false,"pushed_at":"2024-04-11T09:45:23.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T00:12:31.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smorodov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-11T09:43:28.000Z","updated_at":"2024-04-11T09:52:08.000Z","dependencies_parsed_at":"2024-04-11T11:01:13.192Z","dependency_job_id":null,"html_url":"https://github.com/Smorodov/MATLABtoEigenCheatsheet","commit_stats":null,"previous_names":["smorodov/matlabtoeigencheatsheet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Smorodov/MATLABtoEigenCheatsheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smorodov%2FMATLABtoEigenCheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smorodov%2FMATLABtoEigenCheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smorodov%2FMATLABtoEigenCheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smorodov%2FMATLABtoEigenCheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smorodov","download_url":"https://codeload.github.com/Smorodov/MATLABtoEigenCheatsheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smorodov%2FMATLABtoEigenCheatsheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28741627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T01:40:51.112Z","status":"online","status_checked_at":"2026-01-25T02:00:06.841Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T23:16:41.546Z","updated_at":"2026-01-25T02:01:59.692Z","avatar_url":"https://github.com/Smorodov.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MATLAB to Eigen cheat sheet\n\n| MATLAB | Eigen |\n|-----------|---------|\n| `[C, index] = sort(A);`                   | `Eigen::MatrixXd C = A; Eigen::VectorXi index; C.sort(index);`                                    |\n| `[V, D] = eig(A);`                        | `Eigen::EigenSolver\u003cEigen::MatrixXd\u003e es(A); Eigen::MatrixXd V = es.eigenvectors().real(); Eigen::MatrixXd D = es.eigenvalues().real().asDiagonal();` |\n| `A = [1, 2, 3; 4, 5, 6; 7, 8, 9];`       | `Eigen::MatrixXd A(3, 3); A \u003c\u003c 1, 2, 3, 4, 5, 6, 7, 8, 9;`                                       |\n| `A = [1, 2; 3, 4];`                      | `Eigen::MatrixXd A(2, 2); A \u003c\u003c 1, 2, 3, 4;`                                                      |\n| `A = B(:, 2:end);`                        | Not directly available, can be implemented using block operations or manual manipulation of columns. |\n| `A = B(1:2:end, :);`                      | Not directly available, can be implemented using Eigen::VectorXd for indexing or manual iteration. |\n| `A = B(1:3, [1, 3]);`                     | Not directly available, combination of row and column indexing can be implemented using block operations or manual manipulation. |\n| `A = eye(3);`                             | `Eigen::MatrixXd A = Eigen::MatrixXd::Identity(3, 3);`                                            |\n| `A = kron(B, C);`                         | Not directly available, Kronecker product can be implemented using nested loops or custom functions. |\n| `A = linspace(1, 10, 10);`                | Not directly available, can be implemented using Eigen::VectorXd and manual filling of values.    |\n| `A = ones(3, 3);`                         | `Eigen::MatrixXd A = Eigen::MatrixXd::Ones(3, 3);`                                                |\n| `A = rand(3, 3);`                         | `Eigen::MatrixXd A = Eigen::MatrixXd::Random(3, 3);`                                             |\n| `A = reshape(B, 2, 4);`                   | Not directly available, reshape operation can be implemented using Eigen::Map or manual manipulation of indices. |\n| `A = tril(B);`                            | `Eigen::MatrixXd A = B.triangularView\u003cEigen::Lower\u003e();`                                          |\n| `A = triu(B);`                            | `Eigen::MatrixXd A = B.triangularView\u003cEigen::Upper\u003e();`                                          |\n| `A = zeros(3, 3);`                        | `Eigen::MatrixXd A = Eigen::MatrixXd::Zero(3, 3);`                                               |\n| `A(:, [1, 3]) = [];`                     | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(:, 1:2:end) = [];`                    | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(:, 1:2:end) = 0;`                     | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `A(:, 1:2:end) = B;`                     | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `A(:, 1:3) = 0;`                         | `A.block(0, 0, A.rows(), 3).setZero();`                                                          |\n| `A(:, 1:3) = repmat(v, 1, 3);`           | `A.block(0, 0, A.rows(), 3) = v.replicate(1, 3);`                                                |\n| `A(:, end:-1:1) = [];`                   | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(1:2:end, :) = [];`                    | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(1:2:end, :) = 0;`                     | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `A(1:2:end, :) = B;`                     | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `A(1:2:end, 1:2:end) = [];`              | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(1:2:end, 1:2:end) = 0;`               | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `A(1:2:end, 1:2:end) = B;`               | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `A(1:2:end, end:-1:1) = [];`             | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(1:3) = [];`                           | Not directly available, can be implemented using block operations or custom functions.           |\n| `A(1:3) = [4; 5; 6];`                    | `A.segment(0, 3) = Eigen::VectorXd::LinSpaced(3, 4, 6);`                                         |\n| `A(1:3) = 0;`                            | `A.segment(0, 3).setZero();`                                                                     |\n| `A(1:3, 1:3) = 0;`                       | `A.block(0, 0, 3, 3).setZero();`                                                                 |\n| `A(1:3, 1:3) = B(2:4, 2:4);`             | `A.block(0, 0, 3, 3) = B.block(1, 1, 3, 3);`                                                     |\n| `A(end:-1:1, :) = [];`                   | Not directly available, can be implemented using block operations or custom functions.           |\n| `AA = min(A, [], 'all');`                | `double min_all = A.minCoeff();`                                                                 |\n| `AB = min(A, [], 2);`                    | `Eigen::VectorXd min_row = A.rowwise().minCoeff();`                                              |\n| `AC = mean(A, 'all');`                   | `double mean_all = A.mean();`                                                                    |\n| `AD = mean(A, 2);`                       | `Eigen::VectorXd mean_row = A.rowwise().mean();`                                                 |\n| `AE = std(A, 'all');`                    | `double std_dev_all = sqrt((A.array() - A.mean()).square().sum() / (A.size() - 1));`             |\n| `AF = std(A, 0, 2);`                     | `Eigen::VectorXd std_dev_row = ((A.array().rowwise() - A.rowwise().mean()).square().sum() / (A.cols() - 1)).sqrt();` |\n| `AG = linspace(0, 10, 5);`               | `Eigen::VectorXd AG = Eigen::VectorXd::LinSpaced(5, 0, 10);`                                      |\n| `AH = logspace(0, 10, 5);`               | Not directly available, can be implemented using Eigen::VectorXd::LinSpaced and manual transformation. |\n| `AI = zeros(3, 3);`                      | `Eigen::MatrixXd AI = Eigen::MatrixXd::Zero(3, 3);`                                               |\n| `AJ = ones(3, 3);`                       | `Eigen::MatrixXd AJ = Eigen::MatrixXd::Ones(3, 3);`                                               |\n| `AK = eye(3);`                            | `Eigen::MatrixXd AK = Eigen::MatrixXd::Identity(3, 3);`                                           |\n| `AL = rand(3, 3);`                       | `Eigen::MatrixXd AL = Eigen::MatrixXd::Random(3, 3);`                                             |\n| `AM = randn(3, 3);`                      | `Eigen::MatrixXd AM(3, 3); AM.setRandom();`                                                       |\n| `AN = magic(3);`                         | Not directly available, can be implemented using custom functions or manual initialization.      |\n| `AO = hilb(3);`                          | Not directly available, can be implemented using custom functions or manual initialization.      |\n| `AP = pascal(3);`                        | Not directly available, can be implemented using custom functions or manual initialization.      |\n| `AQ = vander(v);`                        | Not directly available, can be implemented using custom functions or manual initialization.      |\n| `AR = toeplitz(v);`                      | Not directly available, can be implemented using custom functions or manual initialization.      |\n| `AS = hadamard(3);`                      | Not directly available, can be implemented using custom functions or manual initialization.      |\n| `AT = gallery('durer');`                 | Not directly available, can be implemented using custom functions or loading external image data. |\n| `B = [5, 6; 7, 8];`                      | `Eigen::MatrixXd B(2, 2); B \u003c\u003c 5, 6, 7, 8;`                                                      |\n| `B = A * C;`                              | `Eigen::MatrixXd B = A * C;`                                                                    |\n| `B = A + 5;`                              | `Eigen::MatrixXd B = A.array() + 5;`                                                             |\n| `B = A + repmat(v, 1, A.cols());`         | `Eigen::MatrixXd B = A.array().colwise() + v.array();`                                           |\n| `B = A(2:3, 1:2);`                        | `Eigen::MatrixXd B = A.block(1, 0, 2, 2);`                                                       |\n| `B = A';`                                 | `Eigen::MatrixXd B = A.transpose();`                                                            |\n| `B = inv(A);`                             | `Eigen::MatrixXd B = A.inverse();`                                                              |\n| `C = [A, B; B, A];`                       | `Eigen::MatrixXd C(A.rows() + B.rows(), A.cols() + B.cols()); C \u003c\u003c A, B, B, A;`                 |\n| `C = A - scalar;`                         | `Eigen::MatrixXd C = A.array() - scalar;`                                                        |\n| `C = A * B + D / scalar;`                | `Eigen::MatrixXd C = (A * B).array() + D.array() / scalar;`                                       |\n| `C = A * B + diag(v) * scalar;`          | `Eigen::MatrixXd C = (A * B).array() + v.array().matrix().asDiagonal() * scalar;`                 |\n| `C = A * B + scalar;`                    | `Eigen::MatrixXd C = (A * B).array() + scalar;`                                                  |\n| `C = A * repmat(v, 1, size(A, 2));`      | Not directly available, can be implemented using custom functions or block operations.             |\n| `C = A * repmat(v, size(A));`            | Not directly available, can be implemented using custom functions or block operations.             |\n| `C = A * repmat(v, size(A, 1), 1);`      | Not directly available, can be implemented using custom functions or block operations.             |\n| `C = A * scalar;`                         | `Eigen::MatrixXd C = A * scalar;`                                                                |\n| `C = A .* B;`                             | `Eigen::MatrixXd C = A.array() * B.array();`                                                    |\n| `C = A .* B;`                             | `Eigen::MatrixXd C = A.array() * B.array();`                                                    |\n| `C = A ./ B;`                             | `Eigen::MatrixXd C = A.array() / B.array();`                                                    |\n| `C = A / scalar;`                         | `Eigen::MatrixXd C = A / scalar;`                                                                |\n| `C = A + B * scalar;`                    | `Eigen::MatrixXd C = A + B.array() * scalar;`                                                    |\n| `C = A + repmat(v, 1, size(A, 2));`      | `Eigen::MatrixXd C = A.array().colwise() + v.array();`                                            |\n| `C = A + repmat(v, size(A));`            | Not directly available, can be implemented using block-wise replication or custom functions.      |\n| `C = A + repmat(v, size(A, 1), 1);`      | `Eigen::MatrixXd C = A.array().rowwise() + v.array();`                                            |\n| `C = A + scalar;`                         | `Eigen::MatrixXd C = A.array() + scalar;`                                                        |\n| `C = A \u003e B;`                              | `Eigen::Matrix\u003cbool, Eigen::Dynamic, Eigen::Dynamic\u003e C = A.array() \u003e B.array();`                 |\n| `C = A(:, [1, 3]);`                       | `Eigen::MatrixXd C = A.cols({1, 3});`                                                             |\n| `C = A(:, 1) * B(1, :);`                 | `Eigen::MatrixXd C = A.col(0) * B.row(0);`                                                        |\n| `C = A(:, 1:2:end);`                      | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A(:, end:-1:1);`                     | `Eigen::MatrixXd C = A.rowwise().reverse();`                                                     |\n| `C = A(:, end:-2:1);`                     | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A([1, 3], :);`                       | `Eigen::MatrixXd C = A.rows({1, 3});`                                                             |\n| `C = A([1, 3], [1, 3]);`                  | `Eigen::MatrixXd C = A.rows({1, 3}).cols({1, 3});`                                                |\n| `C = A(1, :) .* B(:, 1);`                 | `Eigen::MatrixXd C = A.row(0).array() * B.col(0).array();`                                       |\n| `C = A(1:2:end, :);`                      | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A(1:2:end, 1:2:end);`                | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A(1:2:end, 1:2:end);`                | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A(1:2:end, end:-1:1);`               | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A(1:2:end, end:-2:1);`               | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A(1:3, [1, 3]);`                     | `Eigen::MatrixXd C = A.topLeftCorner(3, 2);`                                                      |\n| `C = A(1:end, 2:end);`                    | `Eigen::MatrixXd C = A.bottomRightCorner(A.rows() - 1, A.cols() - 1);`                            |\n| `C = A(end:-1:1, :);`                     | `Eigen::MatrixXd C = A.colwise().reverse();`                                                     |\n| `C = A(end:-2:1, 1:2:end);`               | Not directly available, can be implemented using custom functions or manual iteration.           |\n| `C = A.^2;`                               | `Eigen::MatrixXd C = A.array().square();`                                                       |\n| `C = A.^B;`                               | Not directly available, can be implemented using custom functions or element-wise operations.   |\n| `C = abs(A);`                             | `Eigen::MatrixXd C = A.array().abs();`                                                          |\n| `C = acos(A);`                            | `Eigen::MatrixXd C = A.array().acos();`                                                         |\n| `C = asin(A);`                            | `Eigen::MatrixXd C = A.array().asin();`                                                         |\n| `C = atan(A);`                            | `Eigen::MatrixXd C = A.array().atan();`                                                         |\n| `C = atan2(A, B);`                        | Not directly available, can be implemented using custom functions or element-wise operations.   |\n| `C = cat(1, A, B);`                      | `Eigen::MatrixXd C(A.rows() + B.rows(), A.cols()); C \u003c\u003c A, B;`                                   |\n| `C = ceil(A);`                            | `Eigen::MatrixXd C = A.array().ceil();`                                                         |\n| `C = conv(A, B);`                         | Not directly available, convolution can be implemented using custom functions or libraries like Eigen's convolve. |\n| `C = cos(A);`                             | `Eigen::MatrixXd C = A.array().cos();`                                                          |\n| `C = cosh(A);`                            | `Eigen::MatrixXd C = A.array().cosh();`                                                         |\n| `C = cross(A, B);`                        | Not directly available, can be implemented using custom functions or element-wise operations.   |\n| `C = dot(A, B);`                          | `double dot_product = A.dot(B);`                                                                  |\n| `C = exp(A);`                             | `Eigen::MatrixXd C = A.array().exp();`                                                          |\n| `C = eye(3) * scalar;`                    | `Eigen::MatrixXd C = Eigen::MatrixXd::Identity(3, 3) * scalar;`                                  |\n| `C = fft(A);`                             | Not directly available, FFT can be implemented using libraries like FFTW or custom functions.    |\n| `C = floor(A);`                           | `Eigen::MatrixXd C = A.array().floor();`                                                        |\n| `C = ifft(A);`                            | Not directly available, inverse FFT can be implemented using libraries like FFTW or custom functions. |\n| `C = isempty(A);`                         | `bool is_empty = A.size() == 0;`                                                                  |\n| `C = isequal(A, B);`                      | Not directly available, can be implemented using custom functions or manual comparison.           |\n| `C = isequaln(A, B);`                     | Not directly available, can be implemented using custom functions or manual comparison.           |\n| `C = isfinite(A);`                        | `Eigen::Matrix\u003cbool, Eigen::Dynamic, Eigen::Dynamic\u003e C = A.array().isFinite();`                  |\n| `C = isnan(A);`                           | `Eigen::Matrix\u003cbool, Eigen::Dynamic, Eigen::Dynamic\u003e C = A.array().isNaN();`                     |\n| `C = kron(A, B);`                         | Not directly available, Kronecker product can be implemented using custom functions or manual manipulation. |\n| `C = log(A);`                             | `Eigen::MatrixXd C = A.array().log();`                                                          |\n| `C = max(A, [], 2);`                      | `Eigen::VectorXd row_max = A.rowwise().maxCoeff();`                                              |\n| `C = max(A, [], 'all');`                  | `double max_val = A.maxCoeff();`                                                                  |\n| `C = mean(A);`                            | `double mean = A.mean();`                                                                        |\n| `C = norm(A);`                            | `double norm = A.norm();`                                                                         |\n| `C = norm(A, 1);`                         | `double l1_norm = A.lpNorm\u003c1\u003e();`                                                                 |\n| `C = norm(A, 'fro');`                     | `double frobenius_norm = A.norm();`                                                               |\n| `C = norm(A, inf);`                       | `double linf_norm = A.lpNorm\u003cEigen::Infinity\u003e();`                                                |\n| `C = numel(A);`                           | `int num_elements = A.size();`                                                                    |\n| `C = polyfit(x, y, degree);`              | Not directly available, polynomial fitting can be implemented using libraries like Eigen's PolynomialSolver or custom functions. |\n| `C = polyval(p, x);`                      | Not directly available, polynomial evaluation can be implemented using custom functions or manual calculation. |\n| `C = repmat(A, 2, 3);`                    | Not directly available, can be implemented using nested loops or block-wise replication.          |\n| `C = repmat(v, 1, size(A, 2)) * A;`      | Not directly available, can be implemented using custom functions or block operations.             |\n| `C = repmat(v, size(A)) * A;`            | Not directly available, can be implemented using custom functions or block operations.             |\n| `C = repmat(v, size(A, 1), 1) * A;`      | Not directly available, can be implemented using custom functions or block operations.             |\n| `C = round(A);`                           | `Eigen::MatrixXd C = A.array().round();`                                                        |\n| `C = scalar * A;`                         | `Eigen::MatrixXd C = scalar * A;`                                                                |\n| `C = scalar / A;`                         | Not directly available, can be implemented using element-wise division by scalar.                 |\n| `C = sign(A);`                            | Not directly available, can be implemented using custom functions or element-wise operations.   |\n| `C = sin(A);`                             | `Eigen::MatrixXd C = A.array().sin();`                                                          |\n| `C = sinh(A);`                            | `Eigen::MatrixXd C = A.array().sinh();`                                                         |\n| `C = size(A);`                            | `Eigen::Index rows = A.rows(); Eigen::Index cols = A.cols();`                                     |\n| `C = sort(A);`                            | `Eigen::MatrixXd C = A; C.sort();`                                                               |\n| `C = sortrows(A);`                        | Not directly available, can be implemented using custom functions or manual manipulation of rows. |\n| `C = sqrt(A);`                            | `Eigen::MatrixXd C = A.array().sqrt();`                                                         |\n| `C = std(A);`                             | `double std_dev = sqrt((A.array() - A.mean()).square().sum() / (A.size() - 1));`                |\n| `C = sum(A);`                             | `double sum = A.sum();`                                                                          |\n| `C = sum(A, 2, 'omitnan');`               | `Eigen::VectorXd row_sum = A.rowwise().sum();`                                                  |\n| `C = sum(A, 'all');`                      | `double sum = A.sum();`                                                                           |\n| `C = tan(A);`                             | `Eigen::MatrixXd C = A.array().tan();`                                                          |\n| `C = tanh(A);`                            | `Eigen::MatrixXd C = A.array().tanh();`                                                         |\n| `col_sum = sum(A, 1);`                    | `Eigen::VectorXd col_sum = A.colwise().sum();`                                                  |\n| `D = cat(2, A, B);`                      | `Eigen::MatrixXd D(A.rows(), A.cols() + B.cols()); D \u003c\u003c A, B;`                                   |\n| `D = diag([1, 2, 3]);`                    | `Eigen::VectorXd d(3); d \u003c\u003c 1, 2, 3; Eigen::MatrixXd D = d.asDiagonal();`                        |\n| `E = horzcat(A, B);`                     | `Eigen::MatrixXd E(A.rows(), A.cols() + B.cols()); E \u003c\u003c A, B;`                                   |\n| `element = A(1, 2);`                      | `double element = A(1, 2);`                                                                      |\n| `F = vertcat(A, B);`                     | `Eigen::MatrixXd F(A.rows() + B.rows(), A.cols()); F \u003c\u003c A, B;`                                   |\n| `G = reshape(A, 1, []);`                 | Not directly available, can be implemented using Eigen::Map or manual manipulation of indices.  |\n| `H = reshape(A, 2, 2);`                  | Not directly available, can be implemented using Eigen::Map or manual manipulation of indices.  |\n| `I = reshape(A, [], 1);`                 | Not directly available, can be implemented using Eigen::Map or manual manipulation of indices.  |\n| `J = reshape(A, 1, 4);`                  | Not directly available, can be implemented using Eigen::Map or manual manipulation of indices.  |\n| `K = reshape(A, 4, 1);`                  | Not directly available, can be implemented using Eigen::Map or manual manipulation of indices.  |\n| `L = flip(A, 1);`                        | `Eigen::MatrixXd L = A.rowwise().reverse();`                                                     |\n| `M = flip(A, 2);`                        | `Eigen::MatrixXd M = A.colwise().reverse();`                                                     |\n| `N = flipud(A);`                         | `Eigen::MatrixXd N = A.rowwise().reverse();`                                                     |\n| `O = fliplr(A);`                         | `Eigen::MatrixXd O = A.colwise().reverse();`                                                     |\n| `P = rot90(A);`                          | Not directly available, can be implemented using custom functions or manual manipulation.        |\n| `Q = rot90(A, 2);`                       | Not directly available, can be implemented using custom functions or manual manipulation.        |\n| `R = rot90(A, -1);`                      | Not directly available, can be implemented using custom functions or manual manipulation.        |\n| `row_sum = sum(A, 2);`                    | `Eigen::VectorXd row_sum = A.rowwise().sum();`                                                  |\n| `S = tril(A);`                           | `Eigen::MatrixXd S = A.triangularView\u003cEigen::Lower\u003e();`                                          |\n| `T = triu(A);`                           | `Eigen::MatrixXd T = A.triangularView\u003cEigen::Upper\u003e();`                                          |\n| `U = toeplitz([1, 2, 3]);`               | Not directly available, can be implemented using custom functions or manual manipulation.        |\n| `v = [1; 2; 3];`                          | `Eigen::VectorXd v(3); v \u003c\u003c 1, 2, 3;`                                                            |\n| `V = circshift(A, [1, 1]);`              | Not directly available, can be implemented using custom functions or manual manipulation.        |\n| `W = sum(A, 'all');`                     | `double sum_all = A.sum();`                                                                      |\n| `x = A \\ b;`                              | `Eigen::VectorXd x = A.ldlt().solve(b);`                                                        |\n| `X = sum(A, 'omitnan');`                 | `Eigen::VectorXd sum_row = A.rowwise().sum();`                                                   |\n| `Y = max(A, [], 'all');`                  | `double max_all = A.maxCoeff();`                                                                 |\n| `Z = max(A, [], 2);`                     | `Eigen::VectorXd max_row = A.rowwise().maxCoeff();`                                              |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmorodov%2Fmatlabtoeigencheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmorodov%2Fmatlabtoeigencheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmorodov%2Fmatlabtoeigencheatsheet/lists"}