Yep, with some additional changes (such as Carl Fischer suggested) this is very useful code!
28 Mar 2011
matlabfrag
A matlab figure to .eps and .tex file exporter, similar to LaPrint
Author: Zebb Prime
In the above replace get(0,'ScreenSize') by get(gcf,'Position'). You need to have opened a figure of standard size.
03 Mar 2011
matlabfrag
A matlab figure to .eps and .tex file exporter, similar to LaPrint
Author: Zebb Prime
Wonderful function!
However, had some problems using figures, generated with matlabfrag, as subfigures in LaTeX/pdfLaTeX. The resizing part messed up the label positions so that label ticks and labels itself overlapped. For me the trick was to resize the figures in MATLAB on beforehand. Here is howto:
First get screensize using:
get(0,'ScreenSize')
Size the latter two numbers corresponding to your scale and plot the required figures using:
figure('Position',[x y scaled1 scaled2])
where x and y equal the first two results of the screensize and the scaled1 and 2 represent the scaled values.
This did the trick for me.