Skip to content
Snippets Groups Projects
Commit 0bcd4b60 authored by René Fritze's avatar René Fritze
Browse files

fix sp-mat output

Conflicts:

	stuff/matrix.hh
parent d1b3cda3
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ void printSparseRowMatrixMatlabStyle(const T& arg, const std::string name, strea
out << boost::format("\n%s =sparse( %d, %d );") % name % I % J << std::endl;
for (int row = 0; row < arg.rows(); row++) {
for (int col = 0; col < arg.cols(); col++) {
if (arg(row, col) > eps)
if (std::fabs(arg(row, col)) > eps)
out << name << "(" << row + 1 << "," << col + 1 << ")=" << std::setprecision(12) << arg(row, col) << ";\n";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment