Giter VIP home page Giter VIP logo

table2latex's Introduction

table2latex

Instalation

Download form https://www.mathworks.com/matlabcentral/fileexchange/155182-table2latex and add it to your Matlab path.

Description

This function is able to generate latex function from same syntax as Matlab table has.

Defaul formating for latex table is left align.

Defaul formating for numbers is two digits.

Example

T = table(Model,R2,RMSE,MSE)

latexTable = table2latex(Model,R2,RMSE,MSE)

Output:

Model      R2        RMSE      MSE  
_____    _______    ______    ______
"SP"      0.8872    40.622    1650.1
"ESP"    0.93557    30.702    942.61
"LP"     0.91596    35.016    1223.3
"ELP"    0.98761    13.194    174.08

latexTable =
    '\begin{table}
        \centering
            \begin{tabular}{llll}
                \textbf{Model} & \textbf{R2} & \textbf{RMSE} & \textbf{MSE}\\
                $SP$ & $0.887$ & $40.622$ & $1650.109$ \\
                $ESP$ & $0.936$ & $30.702$ & $942.608$ \\
                $LP$ & $0.916$ & $35.016$ & $1223.294$ \\
                $ELP$ & $0.988$ & $13.194$ & $174.083$ 
            \end{tabular}
    \end{table}'

Add custom formating

format = '%0.2f';
align = 'c';
latexTable = table2latex(Model, R2, RMSE, MSE, format, align)

View table2latex on File Exchange

table2latex's People

Contributors

ajandera avatar

Stargazers

Sarah  Hughes avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.