| 108 | } |
| 109 | |
| 110 | void write_matrix_to_csv( |
| 111 | const std::string & filename, |
| 112 | const Eigen::MatrixXd & T) |
| 113 | { |
| 114 | std::ofstream file(filename.c_str()); |
| 115 | if(!file.is_open()) { |
| 116 | std::cerr << "Error: Unable to open file " << filename << "\n"; |
| 117 | return; |
| 118 | } |
| 119 | file << T.format(CSVFormat); |
| 120 | } |
| 121 | |
| 122 | int main(int argc, char *argv[]) |
| 123 | { |