how to add the solar symbol as a subscript on the y-axis label?

2 visualizzazioni (ultimi 30 giorni)
I am plotting a figure where on the Y axis-label I need the solar symbol. the label would require M_{solar symbol}. I can produce the solar symbol in the label using the following lines of code. But I cannot do "solar symbol" as a subscript. here is my code.
solar = char(9737)
ylabel( ['10^{-6} M',solar, 'Year^{-1}'], 'FontSize',14,'FontWeight','bold')
any suggestions, please ?
  3 Commenti
Walter Roberson
Walter Roberson il 11 Set 2016
Which MATLAB version are you using? Unicode symbols are not expected to work until R2014b or later.
Walter Roberson
Walter Roberson il 11 Set 2016
The LaTeX symbol name is \astrosun from wasysym which is a package not normally included in MATLAB. There are apparently some ways to add LaTeX packages but the ways are not user-friendly.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Solar Power 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