最好的方法是将在 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 的网址和文档。