0

I am using MATLAB Student Version R2011a. I am creating a GUI-table to compare data easier, but I end up in complicated abbreviations, because I don't know how to make multi-line column headings.

I create the table like this (minimal example):

myFigure = figure('Position', [100, 200, 400, 100]);

tableData = magic(3);

cnames = {'convPrice/y', 'rechEn', 'priceRechEn'};
     myTable = uitable('Parent', myFigure, ...
     'Data', tableData, ...
     'ColumnName', cnames, ...
     'Position',[10 10 380 80]);

I took a screenshot and I will upload it, when I reach reputation 10. Thank you for your answers.

Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
Lukas
  • 2,330
  • 2
  • 22
  • 31

1 Answers1

1

You can create multiline column headings using a vertical slash (|) to separate lines. For example:

cnames = {'conv|price', 'rech|en', 'price|rechEn'};
John
  • 480
  • 2
  • 9
  • Thats exactly what I was searching for. I was trying around with `\n` and similar versions. – Lukas Jan 14 '12 at 20:10