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

144 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 13 de Dic. de 2019
Respondida: MathWorks Support Team el 13 de Dic. de 2019
如何在 LaTeX 中插入 MATLAB 绘制的图片?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 14 de Dic. de 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 的网址和文档。

Más respuestas (0)

Categorías

Más información sobre 打印和保存 en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!