Uitable column name with symbols and subscripts

Hello,
I want to write the column name in my uitable as <reff,f> where eff,f are subscripts. I tried using html but for some reason adding the < ruins everything. Help?
PS I am using matlab R2016a

Answers (1)

h = uitable('ColumnName', {'<html>r<sub>eff,f</sub>'})

4 Comments

Thanks but how can I add that between < and > .
the > works but putting < before the <html> ruins it.
1)uit.ColumnName={'Month','N','<html>r<sub>eff,f</sub> >',sig_fm};
gives this:
reff1.PNG
2)uit.ColumnName={'Month','N','< <html>r<sub>eff,f</sub> >',sig_fm};
gives this:
reff2.PNG
3)uit.ColumnName={'Month','N','<html><r<sub>eff,f</sub> >',sig_fm};
gives:
reff3.PNG
i tried to add two strings but i get either output 2 or 3.
This worked!! using the html code for the < symbol:
'<html>&lt r<sub>eff,f</sub> >'
its odd thougth that we can just use > and not its code and it works. Anyone know why this happens?
Sorry I had not realized the < > were intended to be literal.
> is accepted due to lax HTML parsing. A real HTML parser would have given an error .

Sign in to comment.

Categories

Asked:

on 12 May 2019

Commented:

on 12 May 2019

Community Treasure Hunt

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

Start Hunting!