MATLAB: How to link all points on plot

image processinginperpolationsnonlinearplot

I have a small issue, how to link various nonlinear points within loop functions-for example y=0;
for k=1:10
y=k*2+k^3;
plot(y,k,'o-');
hold on;
end
hold off;
The Plot result is as follows. I want to connect all those points. I have little knowledge of interpolations (interp1).
is

Best Answer

Don't put them in loop....calculate all y at once...
k=1:10 ;
y=k*2+k.^3;
plot(y,k,'o-');