When I compile the attached code,I find that: (a) The figure is not centred (b) The subfigures overlap (c) The captions are duplicated. I wasn't able to include the .tikz file as I am a new user. However,I believe any other figure saved in the fig.tikz format and included in the same directory as the attached code snippet along with the matlab2tikz mfile should give a good demonstration of the problem.
\documentclass{report}
\usepackage{subcaption}
\usepackage{tikz,pgfplots}
\usepackage{epsfig}
\begin{document}
\newlength\figureheight
\newlength\figurewidth
\begin{figure}
\centering
\begin{subfigure}{.2\linewidth}
\centering
\setlength\figureheight{4cm}
\setlength\figurewidth{4cm}
\input{fig.tikz} \caption{(a) Fig 1}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}{.2\linewidth}
\centering
\setlength\figureheight{4cm}
\setlength\figurewidth{4cm}
\input{fig.tikz} \caption{(b) Fig 2}
\end{subfigure}\\
\vspace{1cm}
\begin{subfigure}{.2\linewidth}
\centering
\setlength\figureheight{4cm}
\setlength\figurewidth{4cm}
\input{fig.tikz} \caption{(c) Fig 3}
\end{subfigure}
\begin{subfigure}{.2\linewidth}
\centering
\setlength\figureheight{4cm}
\setlength\figurewidth{4cm}
\input{fig.tikz} \caption{(d) Fig 4}
\end{subfigure}
\end{figure}
\end{document}

.tikzfiles from matlab2tikz are just plain text files, no different from.texfiles, simply open one in your texteditor and edit your question to include the code. – Torbjørn T. Sep 16 '12 at 09:30subcaptionhandles this for you, so there's no need to do that. (Also, there's no need to repeat the\setlengths for each figure, once right after the\newlengths will suffice. Unless you want to change the lengths, of course.) – Torbjørn T. Sep 16 '12 at 09:41.2\linewidthfor the width of the subfigures (about 69pt), but the subfigures are 4cm wide (about 114pt). The doubling of the labels is due to the fact thatsubcaptionautomatically provides them. – egreg Sep 16 '12 at 09:42