How to create tables and titles from Matlab variables in a Latex published script.

2 views (last 30 days)
I am trying to insert tables and titles into a Latex published document from variables. I understand how to do this by writing them directly into the script comments. I would like to have them generated from my variables, such as in the following example:
<latex>\n\begin{table}[htdp]\n\begin{tabular}{c|c|c}\n</latex>
disp(A)
<latex>\n\end{tabular}\n\end{table}\n</latex>
However, this results in the following latex output. The variable is inserted as 'verbatim' and the table configuration code is inserted in two different paragraphs. I have a similar problem when trying to insert a title from a variable. Thanks for any help!
\begin{par}
\begin{table}[htdp]
\begin{tabular}{c|c|c}
\end{par} \vspace{1em}
\color{lightgray} \begin{verbatim} 0.3371 0.3112 0.6020
0.1622 0.5285 0.2630
0.7943 0.1656 0.6541
\end{verbatim} \color{black}
\begin{par}
\end{tabular}
\end{table}
\end{par} \vspace{1em}

Answers (0)

Categories

Find more on MATLAB Report Generator in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!