Filter löschen
Filter löschen

Plotting few lines using one matrix

2 Ansichten (letzte 30 Tage)
Maor Levy
Maor Levy am 30 Apr. 2013
Let's say I have two matrices x and y
x = [1 2 3 1 2] y = [1 2 3 1 3]
I want to plot two lines from it, first three points and then two last points.
In the end I want to get this plot. Can I do it with Matlab?

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 30 Apr. 2013
plot(x(1:3),y(1:3))
hold all
plot(x(4:5),y(4:5))

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots 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