필터 지우기
필터 지우기

How to display equation of the line in the figure?

조회 수: 7 (최근 30일)
suvadip paul
suvadip paul 2013년 10월 4일
댓글: Muhammed 2022년 12월 24일
I need to indicate the corresponding equations of the lines within the figure. How to do this? Please look at the attached file.

답변 (2개)

GILBERT ALVIOLA
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
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
Muhammed
Muhammed 2022년 12월 24일
olmamış beğendim

댓글을 달려면 로그인하십시오.


Walter Roberson
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()

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by