Update Legend with varying values (variables) part2
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
GettinStarted
le 4 Juil 2020
Réponse apportée : Nikhil Sonavane
le 14 Juil 2020
Hello,
I have a hard time to figure this configuration out. This time a little bit more precise:
Legend should look like this
Tricky?
2 commentaires
Walter Roberson
le 4 Juil 2020
Your legend(sprintf('curve%d',n)) does not appear to be within the loop?
And if it is, then so is the legend('unit cell')
Réponse acceptée
Nikhil Sonavane
le 14 Juil 2020
As Walter suggested, your legend command should be in a loop to recurrsively update the legend in your figure. Variable Tpc_22 appears in the loop but only its last value is considered by the legend command while including legend in your figure. I would suggest you to use the legend command in the loop as well.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Legend dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!