MATLAB: How to label the maximum and minimum value on a figure

homeworklabel maximum minimum figure

Find the time point that corresponds to the maximum and minimum value. Add a text label to the figure indicating the maximum value. Add a text label to the figure indicating the minimum value.

Best Answer

Have you used the help? Did you look up max, min, and text? You will use each of those functions to solve your homework exercise. Be sure to accept both output arguments of min() and max(). This should be a really really trivial problem, even for a beginner. It's so simple that we can't really even give hints without solving it. It's just 4 lines of code to call min(), max(), and 2 calls to text().
Related Question