How to display equation of the line in the figure?
42 次查看(过去 30 天)
显示 更早的评论
I need to indicate the corresponding equations of the lines within the figure. How to do this? Please look at the attached file.
0 个评论
回答(2 个)
GILBERT ALVIOLA
2017-7-24
编辑:Walter Roberson
2017-7-24
txt1 = ['y = (' num2str(m) ')x + (' num2str(a) ')'];
text(x, y, txt1);
2 个评论
Leela Sai Krishna
2019-5-20
编辑:Leela Sai Krishna
2019-5-20
It works. Thanks for your response.
This text is added along the fitline. how to add this text at topleft.
Thanks in advance
Walter Roberson
2013-10-4
text() the equation into place if you need to have the equation show up in the main figure axis.
Consider instead using legend()
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!