Uitable column name with symbols and subscripts

6 visualizzazioni (ultimi 30 giorni)
Yasmin Samy
Yasmin Samy il 12 Mag 2019
Commentato: Walter Roberson il 12 Mag 2019
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

Risposte (1)

Walter Roberson
Walter Roberson il 12 Mag 2019
h = uitable('ColumnName', {'<html>r<sub>eff,f</sub>'})
  4 Commenti
Yasmin Samy
Yasmin Samy il 12 Mag 2019
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?
Walter Roberson
Walter Roberson il 12 Mag 2019
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 .

Accedi per commentare.

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by