Plotting different vectors (length) into one single plot grpah

조회 수: 20 (최근 30일)
YJ
YJ 2014년 10월 24일
답변: Adam 2014년 10월 24일
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);

답변 (1개)

Adam
Adam 2014년 10월 24일
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.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by