I have a table where I needed multirow and multicolumns as part of my data representation. I am facing 2 problems at this moment:
- My table does not fit within the predefined margin [picture attached]
- If I try to fit the table within margin, the texts does not wrap
As you can see, the width of the page should be 6.97 inches. But my table goes beyond that.
Here is my original code that I am trying.
\begin{table*}
\centering
\caption{Results of Real Experiment}
%\hskip-4.0cm
\begin{tabular}{|c|c|c|c|c|}
\hline
\multirow{2}{*}{Sent Data} &
\multirow{2}{*}{Settings} &
\multirow{2}{*}{Functional logic} &
\multicolumn{2}{c|}{Received data} \\
\cline{4-5}
& & & Valid Receiver & Intruder \\
\hline
\multirow{6}{*}{00001111} & \multirow{3}{*}{Without Titanium Coating} & Fixed & 11110000 or 10110111 & 1111000 or 10110111 \\
\cline{3-5}
& & Deterministic Function & 00101110 or 10110111 & 00101110 or 10110111 \\
\cline{3-5}
& & Non-deterministic Function & 11110101 & 10101010 \\
\cline{2-5}
& \multirow{3}{*}{With Titanium Coating} & Fixed & 10110111 & 11110000 \\
\cline{3-5}
& & Deterministic Function & 10110111 & 00101110 \\
\cline{3-5}
& & Non-deterministic Function & 10110111 & Undefined Sequence \\
\hline
\end{tabular}
\label{tab_results}
\end{table*}
I have tried changing the width of certain columns, and that produced problem 2. The texts do not wrap. Here is what I tried.
\begin{tabular}{|c|p{2.5cm}|c|p{3cm}|p{3cm}|}
I have kept rest of the code unchanged. Here is how it looked. Although it fits within the margin, but the spacing is untidy and not within the standards. The texts of adjacent columns overlap and does not wrap within the column.
I am using TexStudio. Any help and suggestions are greatly appreciated. Thanks!