matlab function to plot a bezier curve