func_latex_table(filename,format,M,V,C)
%--------------------------------------------------------------------------
% func_latex_table(filename,format,M,V,C)
% This version onlly works on Matlab 2016a and later
%
% filename = must be a string without the extension
% formtat = %0.2e, %d, %i, ... search for format
% M = matrix with the values
% V = array of strings defining each colum of M
% C = array of strings defining each line of M
%
% P.S.: 1 - Whenever the character '\' is desired in the LaTeX file, '\\'
% should be used in this Matlab function. This is due to the fact
% that '\' is seen as a restrict character by Matlab.
% 2 - This version onlly works on Matlab 2016 and later
%
% Example:
%
% filename = ['tab_test']; % output will be tab_test.tex
% format = '%0.2e';
% M = rand(4,3);
% V = ["$M_{static}$","$M_{dynamic}$","$M_{total}$"];
% C = ["min";"max";"mean";"$\\sigma$"];
%
% Import the generated file 'filename.tex' into the latex folder. In the
% LaTeX file write:
%
% \begin{table}[H]
% \input{tab_test} % i.e. tab_test = filename. Again, no extension used
% \label{tab_test} % is useful to use label = filename
% \caption{Table desctription}
% \end{table}
%
%--------------------------------------------------------------------------
% Author: Lucas Gomes de Camargos Silveira
% Freee for: reproduction, distribution, modifications and whatever
% version:
% 3 - (11/2017)
% 2 - (10/2017)
% 1 - (01/2008)
%--------------------------------------------------------------------------
Cite As
Lucas Gomes de Camargos Silveira (2025). func_latex_table(filename,format,M,V,C) (https://www.mathworks.com/matlabcentral/fileexchange/65096-func_latex_table-filename-format-m-v-c), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 3.0.0.0 |
