Optimize legend command?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I am struggling with LaTeX in legend, so far I wrote legend like:
legendStrings = string(n);
l = legend(legendStrings);
set(l,'interpreter','latex','string','$x^$'+string(n))
I want legend as
and s on, but when I didn't write anything after ^ in string argument, MATLAB show me error.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/827385/image.png)
Note:
n is an array of number and I'm plotting ananoymous function using flot withour loop.
Please optimize these lines and guide me how to display correctly.
Thanks
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Legend dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!