In LaTex, if the figure is in pdf format, you can click pdfLaTex just once to generate the output. Otherwise, if the figure is in eps format, you have to click button three times to do the same thing by using the LaTex -> dvi2ps -> ps2pdf workflow.
http://jinghaoxu.blogspot.com/2007/04/export-figure-to-pdf-in-matlab.html
The good thing is, Matlab can export figure to pdf format. Unfortunately, when saving a figure to a pdf file in Matlab, you'll find the figure doesn't fit the layout very well, i.e. there is a large margin from the figure to the page boundary. Those margins will be inserted into the LaTex output when you include these pdf figures.
A solution is:
1) After you plot the figure in Matlab, go to 'File->Export Setup', input the size of the output you want, e.g. Width: 6 inches, Height: 5 inches. Then click 'Apply to Figure' button.
2) Don't close the 'Export Setup' window. Go to 'File->Print Preview->Paper', input the same size in the Width and Height options.
3) Don't close the 'Print Preview' window. Go back to the 'Export Setup' window, and click 'Export', then select pdf format and save it.
4) Check the output pdf file, you'll see it is perfect.
没有评论:
发表评论