How to preserve subscript or superscript formatting in a text string?

3 次查看(过去 30 天)
I'm reading out some text strings (units) from some Excel files:
filename = 'AAA.xlsx';
opt = detectImportOptions(filename);
opt.VariableUnitsRange = '2:2'; % 2nd row
T1 = readtable(filename, opt);
The problem is that I would have a unit like this: mol kg^-1, and after it is read out, the superscript formatting of "-1" is lost.
Is there an option so that I could preserve the superscript formatting?
Thanks.

回答(0 个)

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by