How can I create a single header for two columns for a table?

7 visualizaciones (últimos 30 días)
Panos Ale
Panos Ale el 17 de En. de 2018
Respondida: Peter Perkins el 17 de En. de 2018
Hallo!!I have created this table:
using the command:
LowerBound=[-0.2213;-0.2047;-0.1860;-0.1804;-0.0890;-0.0597];
UpperBound=[-0.2828;-0.2673;-0.2475;-0.2416;-0.1531 ;-0.1173];
AlpaParameter=[0.25;0.24;0.22;0.21;0.12;0.09];
IQR={'Fixed';'IQR=250';'IQR=500';'IQR=600';'IQR=750';'IQR=1000'};
T = table(AlpaParameter,LowerBound,UpperBound,'RowNames',IQR)
uitable('Data',T{:,:},'ColumnName',T.Properties.VariableNames,'RowName',T.Properties.RowNames,'Units', 'Normalized', 'Position',[0, 0, 1, 1]);
How can I create a common header for both the two last columns like this:
thanks!

Respuestas (1)

Peter Perkins
Peter Perkins el 17 de En. de 2018
One possibility is
ConfidenceInterval = [LowerBound,UpperBound];
T = table(AlpaParameter,ConfidenceInterval,'RowNames',IQR)
Notice that because ConfidenceInterval is an Nx2 numeric matrix, you lose the names LowerBound and UpperBound. You could also make ConfidenceInterval a table, as
ConfidenceInterval = table(LowerBound,UpperBound);
and then nest that inside t. Hard to know which would be more useful for you.

Categorías

Más información sobre Interactions, Camera Views, and Lighting en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by