MATLAB: Plot to a central point

graphing plot to one point

I'm having some issues getting my script to plot two vectors to a central point on a graph. Here is what I have so far.
I basically want the plot to create lines to the central red point only and not to each other. Can anyone help me with this?

Best Answer

n = length(xcoords);
px(1:2:2*n-1) = xcoords;
px(2:2:2*n-2); = xcenter;
py(1:2:2*n-1) = ycoords;
py(2:2:2*n-2); = ycenter;
plot(px,py,'y-')