Executing MATLAB script inside LATEX editor like TexStudio

16 ビュー (過去 30 日間)
Ashish Meshram  (Meet)
Ashish Meshram (Meet) 2018 年 1 月 28 日
コメント済み: Rik 2018 年 1 月 28 日
Currently, I'm using MATLAB to generate data and save in filename.txt. In LATEX I'm using pgfplots package where I use this filename.txt to plot data according to my need. I was thinking of is there any package available (like pycode which allow executing python code inside latex environment) which allow executing my MATLAB script inside latex environment.

回答 (1 件)

Rik
Rik 2018 年 1 月 28 日
Not directly, as far as I can tell, but this post should give you an idea of how you can tackle this problem: MATweave
  2 件のコメント
Ashish Meshram  (Meet)
Ashish Meshram (Meet) 2018 年 1 月 28 日
I saw your MATweave. I guess its same as somewhat like matlab-prettifier. I want to execute the script instead of embedding.
Rik
Rik 2018 年 1 月 28 日
What you should be able to do is to create a custom compile command. With that you can call Matlab from the commandline first, before you TeX compiler continues with the rest of the compiling process. I know TeXmaker has the option of creating a custom compile command.
You can even adapt your Matlab script to create a LaTeX file and use input in your main file.
The idea is the exact opposite of matlab-prettifier, as the idea here is that the code is included in the LaTeX file, but not the end document.
It's a simple and elegant solution, I wish it were mine.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by