toLatex method
Implementation
String toLatex() {
String s = "";
s += "\\begin{pmatrix}\n";
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
s += entries[i][j].toLatex();
if (j != n - 1) s += " & \t";
}
if (i != m - 1) s += "\\\\";
s += "\n";
}
s += "\\end{pmatrix}";
return s;
}