std::ofstream myfile; myfile.open("output.csv"); myfile << format(outMat,"csv") << std::endl << std::endl; myfile.close();
Above code save the matrix into a csv (comma-separated values) file which can be imported by MATLAB easily using 'load' function.
Reference:
Saving matrix in double precision from OpenCV (C++) for Matlab
No comments:
Post a Comment