如何在 LaTeX 中插入 MATLAB 绘制的图片?
140 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 13 Déc 2019
Réponse apportée : MathWorks Support Team
le 13 Déc 2019
如何在 LaTeX 中插入 MATLAB 绘制的图片?
Réponse acceptée
MathWorks Support Team
le 14 Déc 2019
最好的方法是将在 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 的网址和文档。
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!