How to show/ indicate the absolute Maximum and Minimum on a plot in matlab?
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
1 Kommentar
Antworten (1)
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.
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!