Is there any way to import raw MATLAB output into .tex documents?
I have already seen verbatim package as a solution, but it does not meet my demands for 2 reasons:
- Matrix elements are not aligned, especially when some elements have decimal digits and others don't.
- It is not quite convenient, in case MATLAB generates a large output.
Also, I have tested matrix2latex.m but it seems useful only for matrices.
As I said before, it would be convenient to me if I could just import the raw MATLAB output into my .tex file, keeping the format as the one in MATLAB command window.
Thank you!
Edit: Added output generated by an .m script.


\ttfamily) in your document with averbatimor similar environment, everything should line up consistently. If you're having some other problem, please construct a MWE with the smallest MATLAB output that shows the problem. – Mike Renfro Jan 31 '15 at 19:37output.txt (oroutput.dat,output.csvetc) and then usepgfplotstableorcsvsimpleto import them. On the other hand, you can use matlab'spublish` feature too. – Feb 01 '15 at 00:46