y_plot=[0.246913580246914 -1.33333333333333 2.10000000000000;
-1.66666666666667 20 -57.3000000000000;
0.408163265306122 -7.10204081632653 31.1938775510204;
0.246913580246914 -4.29629629629630 18.9888888888889;
-1.66666666666667 40 -237.300000000000;
0.408163265306122 -12 88.5000000000000;
0.246913580246914 -7.25925925925926 53.6555555555556;
-1.66666666666667 60 -537.300000000000;
0.408163265306122 -16.8979591836735 175.193877551020;
0.246913580246914 -10.2222222222222 106.100000000000;
-1.66666666666667 80 -957.300000000000;
0.408163265306122 -21.7959183673469 291.275510204082;
0.246913580246914 -13.1851851851852 176.322222222222;
-1.66666666666667 100 -1497.30000000000]
x_div=2
L=[6,6,6,6,6]
position=L(:,1);+0.1*L(:,curve)
contador_vector=1
points_x=[]
points_y=[]
for curve=2:1:(n-1)
for position=position:x_div:position+(0.9*L(:,curve)/2)
if position<sum(L)
eq=y_plot(curve*2+contador_vector-2,1)*x^2+y_plot(curve*2+contador_vector-2,2)*x+y_plot(curve*2+contador_vector-2,3);
points_x=[points_x,position];
points_y=double([points_y,subs(eq,x,position)]);
else
end
end
for position=position:x_div:position+0.9*L(:,curve)
if position<sum(L)
eq=y_plot(curve*2+contador_vector-1,1)*x^2+y_plot(curve*2+contador_vector-1,2)*x+y_plot(curve*2+contador_vector-1,3);
points_x=[points_x,position];
points_y=double([points_y,subs(eq,x,position)]);
else
end
end
for position=position:x_div:(position+L(:,curve)+0.1*L(:,curve)-0.1*(L(:,curve)-L(:,curve+1)))
if position<sum(L)
eq=y_plot(curve*2+contador_vector,1)*x^2+y_plot(curve*2+contador_vector,2)*x+y_plot(curve*2+contador_vector,3);
points_x=[points_x,position];
points_y=double([points_y,subs(eq,x,position)]);
else
end
end
position=position+x_div;
contador_vector=contador_vector+1;
end
points_x'
points_y'