How to display the value of output on plot?
조회 수: 146 (최근 30일)
이전 댓글 표시
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/388223/image.png)
Error_x(count)=sqrt(error)/sqrt(DN);
end
figure
hold on
plot(Error_x,'s-r')
댓글 수: 0
답변 (2개)
KSSV
2020년 10월 22일
편집: KSSV
2020년 10월 22일
Read about text. With this function, you can specify the string str by providing location (x,y). At this position (x,y) you can display a string str.
댓글 수: 5
KSSV
2020년 10월 22일
With the data in hand ..you can find R^2 and you can use text or annotate. Also after plotting you can go to edit and insert a text box manually.
Walter Roberson
2020년 10월 22일
You can use text() or you can use annotate() . I would suggest that text() is much easier to use for this purpose.
You could also build the value into the title() of the plot, of course.
Your output appears to be a vector, so it is not immediately clear what output you want to display.
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!