How to make output X Y graph like the picture?

2 visualizaciones (últimos 30 días)
Zaky Ghalib
Zaky Ghalib el 17 de Mayo de 2023
Comentada: Mathieu NOE el 22 de Mayo de 2023
can you help me, How to make output X Y graph like the picture?

Respuestas (1)

Mathieu NOE
Mathieu NOE el 17 de Mayo de 2023
hello
you simply have to remember that vertical lines need you to duplicate the x value (with different y values of course)
like in this example x = 2 for both y = 1 and 2
x = [1 2 2 3];
y = [1 1 2 2];
plot(x,y,'linewidth',5);
xlim([0 4]);
ylim([0 3]);

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by