I think the easiest way of doing this is to format the data in Matlab and use fprintf to save it to a file. You can then include that file in your Latex-document.
A = [1 2 3; 4 5 6; 7 8 9];
latex_table = latex(sym(A));
file = fopen('/path/to/output.tex','w');
fprintf(file,'%s',latex_table);
fclose(file);
Or you can write a Matlab function which output the latex-code as a macro.
function [ ] = savetable(varargin)
% SAVETABLE(handle, matrix, file)
handle = char(varargin{1});
latex_table = latex(sym(varargin{2}));
file = fopen(varargin{3}, 'a');
fprintf(file,'\\newcommand{\\%s}{\n\t',handle);
fprintf(file,'\t%s\n}',latex_table);
fclose(file);
Example
Use can use this to write several different equations in the same file as shown below.
A = [1 2 3; 4 5 6; 7 8 9];
B = [10 11 12;13 14 15;16 17 18];
savetable('eqA',A,'equations.tex')
savetable('eqB',B,'equations.tex')
A Latex-document might look something like this:
\documentclass{article}
\input{equations}
\begin{document}
Here we have a nice matrix:
\[
\eqA{}
\]
And here is another one:
\[
\eqB{}
\]
\end{document}
latexandsymcommands? can they be found int Matlab? – Alex Mar 23 '16 at 04:43