MATLAB Answers


Is there a way to make a column name in a uitable have superscript text?

Asked by Scott
on 22 Mar 2013
 headers = {'Depth | (m)','Thickness|(m)',' Velocity | (m/sec)','Unit Weight |... (kN/m^3)',' | PI',' | OCR','','Minimum Vs | (m/sec)','','Maximum Vs |... (m/sec)','Sigma (ln) | Velcity'};


I want the 3 in m^3 to be superscript but i cant find a way to make it work in the uitable coulumn name property.


1 Answer

Answer by Jing
on 29 Mar 2013

Try the html format for the names.

    headers = {'Depth | (m)','Thickness|(m)',' Velocity | (m/sec)','<html>Unit Weight<br>... (kN) m<sup>3</sup></html>',' | PI',' | OCR','','Minimum Vs | (m/sec)','','Maximum Vs |... (m/sec)','Sigma (ln) | Velcity'};


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!