The table below is a uitable created within App Designer that has been modified using the following code:
app.UITable2.ColumnName = {'node iD', 'X', 'Y', 'Z'};
app.UITable2.ColumnWidth = {80, 80, 80, 80};
nodeindex = (1:1:length(app.D.Coord))';
nodeid = num2cell(nodeindex);
Xcoord = num2cell(app.D.Coord(1,:)');
Ycoord = num2cell(app.D.Coord(2,:)');
Zcoord = num2cell(app.D.Coord(3,:)');
app.UITable2.Data = [nodeid Xcoord Ycoord Zcoord];
I wish to do two things:
- Format the column headers (modify text font and weight, text colour and background)
- Centrally align the data within the table.
Any help would be appreciated. I have searched through the documentation and other similar answers but have found nothing as of yet that seems to work.
Thanks in advance, Sam