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

11 Ansichten (letzte 30 Tage)
y0=0
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')
xlim([-1,17]);
ylim([-27000,16000]);
xlabel('X[ft]');
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

Antworten (1)

Image Analyst
Image Analyst am 10 Dez. 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.

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by