Display the terminal value on the plot
5 views (last 30 days)
Show older comments
Suppose I have a plot
x=1:0.01:10;
y=x+1;
plot(x,y)
Then I want to have a terminal value of y on the plot like "the terminal value of y is 11." Please advise.
1 Comment
Accepted Answer
Star Strider
on 27 Apr 2020
Try this:
x=1:0.01:10;
y=x+1;
plot(x,y)
text(x(end), y(end), sprintf('Terminal value of y is %.0f \\rightarrow', y(end)), 'HorizontalAlignment','right')
ylim([min(ylim) 1.1*max(ylim)])
.
More Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!