Help with graph legend.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giuseppe
am 23 Apr. 2014
Bearbeitet: Mischa Kim
am 23 Apr. 2014
This is my attempt at displaying this in the legend of the graph.
legend('y=',num2str(c(1)),'x^2+',num2str(c(2)),'x+',num2str(c(3))')
However it becomes all misplaced with many legends created. All I would like is one which reads.
y = ax^2+bx+c
Where of course a, b and c are coefficients. I have a matrix of these coefficients and I would like to display the equation even if there values change.
I need to use this approach with no assistance from other built in functions.
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 23 Apr. 2014
Bearbeitet: Mischa Kim
am 23 Apr. 2014
Giuseppe, use
legend(strcat('y=',num2str(c(1)),'x^2+',num2str(c(2)),'x+',num2str(c(3))))
or (without built-in function)
legend(['y=',num2str(c(1)),'x^2+',num2str(c(2)),'x+',num2str(c(3))])
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!