Another way of getting nice plots from MATLAB to a LaTeX document is to use matlab2tikz, which creates a TikZ/PGFplots figure that can be input to your document.
This has the added benefit of working with pdflatex as well.
A simple example
While the use is fairly straightforward, I thought I might add an example.
Below is a very simple MATLAB script, the TikZ/PGFplots file generated by this, and a minimal LaTeX document, where it is used. matlab2tikz must of course be in MATLABs path. Add the folder to the path by selecting File --> Set path in MATLAB.
Specifying the width and height of the plot in the MATLAB script isn't necessary. Neither is using custom macros, e.g., \plotw and \ploth to define the width and height. The manual of matlab2tikz mentions this, so that it's a notch easier to change the parameters from within the LaTeX document. And if you have several figures that should be the same size, it is definitely convenient.
The .m-file
x = -10:1:10;
y = x.^2;
plot(x,y)
xlabel('x')
ylabel('x^2')
title('Lovely plot')
matlab2tikz('demo.tex','width','\plotw','height','\ploth')
demo.tex
% This file was created by matlab2tikz v0.1.4.
% Copyright (c) 2008--2011, Nico Schlömer <nico.schloemer@gmail.com>
% All rights reserved.
%
% The latest updates can be retrieved from
% http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz
% where you can also make suggestions and rate matlab2tikz.
%
\begin{tikzpicture}
\begin{axis}[%
scale only axis,
width=\plotw,
height=\ploth,
xmin=-10, xmax=10,
ymin=0, ymax=100,
xlabel={$x$},
ylabel={$x^2$},
title={Lovely plot},
axis on top]
\addplot [
color=blue,
solid
]
coordinates{
(-10,100)(-9,81)(-8,64)(-7,49)(-6,36)(-5,25)(-4,16)(-3,9)(-2,4)(-1,1)(0,0)(1,1)(2,4)(3,9)(4,16)(5,25)(6,36)(7,49)(8,64)(9,81)(10,100)
};
\end{axis}
\end{tikzpicture}
LaTeX document
\documentclass{article}
\usepackage{pgfplots}
\usepackage{kantlipsum} % for a little dummy text
\newcommand\plotw{8cm}
\newcommand\ploth{4cm}
\begin{document}
\kant[1]
\begin{figure}[h]
\centering
\input{demo}
\caption{Plotting}
\end{figure}
\kant[2]
\end{document}

matlab2tikzI think. – Torbjørn T. Dec 14 '11 at 15:38articleclass and not some thesis class, worked fine for me, so I'm guessing that it's either something with the file generated bylaprint, or some issue with the class (know idea what that could be though). – Torbjørn T. Dec 14 '11 at 16:10laprintissue, you should probably post either theSparsAvgPerffile, the.mfile that created the file, or even both. – Torbjørn T. Dec 14 '11 at 16:23