如何在 LaTeX 中插入 MATLAB 绘制的图片?

如何在 LaTeX 中插入 MATLAB 绘制的图片?

 Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 14 Dez. 2019

2 Stimmen

最好的方法是将在 MATLAB 中绘制的图片导出成 eps 格式,然后将该文件插入 LaTeX 中。其中,导出 eps 可以使用 print 函数。例如:
>> plot(1:10)
>> print -deps epsFig
此时会在 MATLAB 的工作路径下自动生成 eps 文件。
插入 LaTeX 时,需要:
1.在 \begin{document} 之前加入:
\usepackage{graphicx}
2.在插入图片的位置加入参考代码:
\begin{figure}
\centering
\includegraphics{Figure name without .eps extension}
\caption{Insert caption}
\end{figure}
关于 LaTeX 相关语法请参考 LaTeX 的网址和文档。

Weitere Antworten (0)

Kategorien

Mehr zu 打印和保存 finden Sie in Hilfe-Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!