Matlab data to latex

36 ビュー (過去 30 日間)
Marc
Marc 2014 年 6 月 11 日
コメント済み: fhz 2022 年 3 月 3 日
hey guys,
i created some code on matlab for calculate some formulas. the output values are in a 3x2, 3x1, 2x2 matrix. for example voltage u_11, u_12 etc...
with every time i run the .m file of my calculation for sure the variables change their values in cause of other inputs.
all in all i want to write in latex in the align-mode line under line u_12= 5 V \\ u_13= 7 V \\ and so on....
it would be stupid to copy all the values with the cursor and fill it in manually.
how can i create a file with the values in a matrix and then write in latex
u_12= data(u_12) where data is the file which is created by matlab.
thanks.
  1 件のコメント
José-Luis
José-Luis 2014 年 6 月 11 日
編集済み: José-Luis 2014 年 6 月 11 日
You could create strings in Matlab with the Latex commands you require, save as a text file and insert a pointer to that text file in your Latex document.

サインインしてコメントする。

回答 (1 件)

fhz
fhz 2020 年 2 月 10 日
Hi Marc.
I've had the same issues you have, then I wrote some code to facilitate the process.
I may indicate for you my Matlab to LaTeX Library and also my File Manipulation Library.
Any suggestions are appreciated.
  2 件のコメント
Jakob Dupont
Jakob Dupont 2022 年 3 月 3 日
編集済み: Jakob Dupont 2022 年 3 月 3 日
Hi @fhz
I new to MatLab (as in brand new) but experienced in LaTeX. Do you have some sort of example or guide on how to use your library?
/ j
fhz
fhz 2022 年 3 月 3 日
Yes, there are examples in my library, unfortunately there are not separated and organized in a document.
There is a script with a full example envolving control engineering (I recently update it).
Each function has it own examples inside it. I suggest testing each example inside each function.
Some functions that use symbolic variable and the command "latex" from matlab and others were designed by me to deal with the problems I faced.
I shall say the perfect use is combining both of my libraries, since some functions write and edit latex files they use my File Manipulation Library.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLaTeX についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by