Plotting different vectors (length) into one single plot grpah

20 Ansichten (letzte 30 Tage)
YJ
YJ am 24 Okt. 2014
Beantwortet: Adam am 24 Okt. 2014
I have a problem when I try to make a plott with this code below.. I do know that it has all different size, but is there way to put them in one plot graph?
x1400 = [0;5;10;15];
x1300 = [0;5;10;15;20;25];
x1290 = [0;5;10;15;20;25];
y1400 = [0;991.99725;609.473;346.669];
y1300 = [0;101.1337;1956.477794;1350.206088;640.8293413];
y1290 = [0;0;453.36325;2104.90125;3358.576;1175.766];
plot(x1400,y1400);
hold on;
plot(x1300,y1300);
hold on;
plot(x1290,y1290);

Antworten (1)

Adam
Adam am 24 Okt. 2014
x1300 and y1300 are different lengths.
There is no problem plotting lines with different numbers of points on the same graph, but each line has to have the same number of points in its own (x,y) pair.

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