Effacer les filtres
Effacer les filtres

Plotting different vectors (length) into one single plot grpah

20 vues (au cours des 30 derniers jours)
YJ
YJ le 24 Oct 2014
Réponse apportée : Adam le 24 Oct 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);

Réponses (1)

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

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by