How to write a legend in latex format
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kalasagarreddi Kottakota
am 20 Aug. 2019
Beantwortet: Star Strider
am 20 Aug. 2019
Npc=2;
legend('\Sigma_{i=1}^{Npc} x^\prime_i','Total L_w','Noise');
In the below figure's legend, how do we need to include a variable Npc.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 20 Aug. 2019
Try this:
Npc=2;
legend(sprintf('\\Sigma_{i=1}^{%d} x^\\prime_i',Npc),'Total L_w','Noise');
That worked correctly when I tested it with a plot of random data.
0 Kommentare
Weitere Antworten (1)
darova
am 20 Aug. 2019
Concatenation?
Npc=2;
legend1 = ['\Sigma_{i=1}^{', num2str(Npc) ,'Npc} x^\prime_i'];
legend(legend1,'Total L_w','Noise');
0 Kommentare
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!