MATLAB: Displaying a different name on columns and rows than the official row or column name

column namesrow namestable

Hi,
I had a question more on the displaying of tables than anything else. I am creating a table with array2table where each column and row has a unique name to identify it. However, when I display the table, I would like for the display to give different names for the column and row names than the official designation. The root of the problem is that I would like to create a table with column and row names which repeat. I understand that the table environment does not allow that so I am creating the table with unique row and column names, but I was wondering if it was possible to change the names that are displayed. Thank you in advance…

Best Answer

No, they display as they truly are. However you can make your own function to take a table and print it out to the command window using fprintf() in exactly the format that you want.