Borrar filtros
Borrar filtros

Plotting different vectors (length) into one single plot grpah

20 visualizaciones (últimos 30 días)
YJ
YJ el 24 de Oct. de 2014
Respondida: Adam el 24 de Oct. de 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);

Respuestas (1)

Adam
Adam el 24 de Oct. de 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.

Categorías

Más información sobre 2-D and 3-D Plots 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