Error when placing tabular inside table environment

I have a working tabular (maybe not that elegant) that I want to place within a table environment in order to get caption and to get it in List of Tables. However, this is not as simple as i thought. I've tried to make a MWE:

\documentclass{article}
\usepackage{float}
\usepackage{booktabs}

\begin{document}

\begin{table}
\centering
\caption{TEST}
\label{tbl:testlabel}

\noindent \bgroup
\def\arraystretch{1.2}
\begin{tabular}[c]{|l || c| c| c| c| c| c|}
\cline{2-7}
\multicolumn{1}{c|}{} & TRNSYS & Modelica & \parbox[t]{0.8cm}{Mat-Lab} &     EnergyPlus & \parbox[t]{0.7cm}{IES VE} & \parbox[t]{0.7cm}{IDA ICE} \\[15pt]
\hline
\hline
\parbox[t]{4cm}{\raggedright{a\\b}} & N & N & N & Y & Y & Y \\[15pt]
\hline
\parbox[t]{4cm}{c\\d} & N & N & N & N & N & Y\\[15pt]
\hline
\parbox[t]{4cm}{\raggedright{e\\f}} & N & N & N & N & Y & Y+\\[15pt]
\hline
\parbox[t]{4cm}{\raggedright{f\\h}} & Y & Y & Y & N? & N? & Y\\[15pt]
\hline
\parbox[c]{4cm}{\textbf{Number of "Y"}} & \textbf{4} & \textbf{6} & \textbf{4} &             \textbf{3} & \textbf{3} & \textbf{6}\\
\hline
\end{tabular}
\end{table}
\end{document}


I'm quite new to Latex, so I have no idea what is wrong. Share LaTex/Temaker tells me a } is missing on the second last line, but I don't get it!

• remove \noindent \bgroup – David Carlisle Oct 1 '14 at 12:23

You have forgotten \egroup (matching \bgroup) between \end{tabular} and \end{table}.
• while this is true, actually the extra group isn't needed inside the table environment, since that is a "closed" environment. – barbara beeton Oct 1 '14 at 12:34
• I know, but the question was substantially "Where is the missing }?", so I told him/her. Maybe he/she needs other \arraystretch values inside the table. – Astrinus Oct 1 '14 at 12:36
• the presence of \bgroup before the \arraystretch would indicate that the stretch is to be limited in some way, and that makes good sense. but the table environment makes this self-limiting. (there may be another tabular further along in the document that now has a "missing" \bgroup, reported in the log as a missing {. so @PhilN should check for that too.) – barbara beeton Oct 1 '14 at 12:45
• If you just do this you will get a spurious space to the left of the table (from the newline after the } better to remove the \noindent (there is no indentation to suppress anyway as it is in the scope of \centering) – David Carlisle Oct 1 '14 at 15:32