Rank: 494 based on 243 downloads (last 30 days) and 1 file submitted
photo

Eli Duenisch

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Eli Duenisch
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Aug 2014 Screenshot Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch latex, tables, data export, conversion, convert, table 243 17
  • 5.0
5.0 | 7 ratings
Comments and Ratings by Eli Duenisch View all
Updated File Comments Rating
27 Jul 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch

This update brings the option to pivot/transpose your table. It is now possible to define the data format (how your data is shown in LaTex) column- or row-wise.

02 Jun 2014 Matlab Icon for Linux (with Transparency) A nice icon to use as Matlab start button in Linux. Author: Georg Stillfried

10 Apr 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch

The function works row-wise so the format for each data row is the same. You could tweak the code in section '% generate row-format cell array based on input.tableDataFormat' and then apply the format in section '% make table rows:'. I'm planning to implement switching between row-wise and cloumn-wise tables in my next update.

08 Apr 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch

By now the function only supports multi-row headers. I'm planning to rewrite the code in a way that the whole table can be pivoted between row-based and cloumn-based. This would also cover multi-line and multi-row headers.

07 Apr 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch

Hi Manuel, yes it is possible. The function gives back a cell array containing the lines of the LaTex code. You can loop through this cell array and print the lines to a text document. Try something like this:

myCellArray = latexTable(input);
fid = fopen('myLatexFile.tex', 'wt+')
for i = 1 : size(myCellArray,1)
fprintf(fid, '%d%d%s\t\n', myCellArray{i,:});
end
fclose(fid);

Comments and Ratings on Eli Duenisch's Files View all
Updated File Comment by Comments Rating
09 Dec 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch Jan Kubanek

Good.
I needed a more flexible formatting of the columns or rows, like this:
input.dataFormat = {'%.1f', [1 3 5], '%.3f', [2 4 6]};
This sets different formats for particular columns (alternating in this example).

To do so, simply change the loop starting with
for i=1:2:lengthDataFormat

TO
for i=1:2:lengthDataFormat
dataFormatList(input.dataFormat{i+1},1) = repmat(input.dataFormat(i),length(input.dataFormat{i+1}),1);
end

24 Aug 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch Pablo

Thanks for posting this code. Very useful!

24 Aug 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch Pablo

27 Jul 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch Eli Duenisch

This update brings the option to pivot/transpose your table. It is now possible to define the data format (how your data is shown in LaTex) column- or row-wise.

10 Apr 2014 Converting MATLAB data to LaTex table Converts matrices or tables to LaTex table code. Features data formats,pivoting,column/row headers. Author: Eli Duenisch Eli Duenisch

The function works row-wise so the format for each data row is the same. You could tweak the code in section '% generate row-format cell array based on input.tableDataFormat' and then apply the format in section '% make table rows:'. I'm planning to implement switching between row-wise and cloumn-wise tables in my next update.

Contact us