diff --git a/src/eigen.cpp b/src/eigen.cpp index eaf917f..320575e 100644 --- a/src/eigen.cpp +++ b/src/eigen.cpp @@ -36,7 +36,7 @@ void EigenWrite(const std::string& fname, const Matrix& A) { // write the matrix by rows for (int i = 0; i < A.rows(); i++) { for (int j = 0; j < A.cols(); j++) { - file << std::setw(20) << A(i, j) << (j < A.cols() - 1 ? " " : ""); + file << std::setw(24) << A(i, j) << (j < A.cols() - 1 ? " " : ""); } file << "\n"; } } diff --git a/src/main.cpp b/src/main.cpp index dc774df..580dc4f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -472,8 +472,8 @@ int main(int argc, char** argv) { // save the spectral analysis results if available if (res.msv.spectra.size()) { for (size_t i = 0; i < res.msv.spectra.size(); i++) { + Matrix<> A(res.msv.t.size(), 3); A << res.msv.t, res.msv.acfs.at(i).real(), res.msv.acfs.at(i).imag(); EigenWrite(std::filesystem::path(ip) / ("acf" + std::to_string(i) + ".mat"), A); Matrix<> F(res.msv.f.size(), 2); F << res.msv.f, res.msv.spectra.at(i).cwiseAbs(); EigenWrite(std::filesystem::path(ip) / ("spectrum" + std::to_string(i) + ".mat"), F); - Matrix<> A(res.msv.t.size(), 2); A << res.msv.t, res.msv.acfs.at(i).cwiseAbs(); EigenWrite(std::filesystem::path(ip) / ("acf" + std::to_string(i) + ".mat"), A); } } }