MATLAB: Display the terminal value on the plot MATLAB 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. Best Answer 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)]). Related SolutionsMATLAB: How to plot a graph of this equation x=-10:0.1:10 Y=1./(x.^2)+8plot(x,Y) MATLAB: I am getting a straight line while running the following code. What is going wrong? x=0.1:0.001:10;y=exp(-x.^2/2)./sqrt(x);plot(x,y)It's ./ instead of / Related QuestionSetting the step of x and y axesHow to find the extreme points
Best Answer