MATLAB Answers

How to show/ indicate the absolute Maximum and Minimum on a plot in matlab?

4 views (last 30 days)
Rahul Ranga Rao Koduri
Rahul Ranga Rao Koduri on 10 Dec 2019
Commented: Joe Vinciguerra on 10 Dec 2019
y1=piecewise(x<=0,0, 0<x<4,15408,4<x<=16,(-3424*x) + 29104, x>=16, 0);
fplot (y1, 'b', 'LineWidth', 2);
hold on;
figure (1); fplot(y0, 'black', 'LineWidth', 1);
title ('The Shear Force Diagram')
ylabel ('V[lb]');
I need to show a marker at the absolute maximum on this plot
I know it is at x=16 and y= -2.568e4

  1 Comment

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 10 Dec 2019
Since you know x and y, how about
hold on;
plot(x, y, 'ro', 'LineWidth', 2, 'MarkerSize', 20); % Plot a circle around the max
Adjust the numerical parameters to your liking.


Sign in to comment.

Sign in to answer this question.