Matlab connect outer boundary points in plot
<p>Please find attached a footprint plot of a missile trajectory.
I want to connect the most outer points of the plot, like this: 
<a href="http://nl.mathworks.com/help/matlab/ref/boundary.html" rel="nofollow noreferrer">http://nl.mathworks.com/help/matlab/ref/boundary.html</a> .
Problem is this boundary function has been implemented in matlab 2014. Unfortunatly, I have to deal with Matlab 2013a...
How can I achieve the same plots as the newer boundary function? My plot-command is simply:</p>

<pre><code>plot(x,y)
</code></pre>

<p>Thanks in advance. 
<a href="https://i.stack.imgur.com/2Lj4Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Lj4Q.png" alt="enter image description here"></a></p>

<p>edit: I used the convhull command. According to the description it should do the job. However, something is going wrong. the code: </p>

<pre><code>figure(4)
subplot(1,2,1);
plot(y_array,x_array,'b*');
k=convhull(y_array,x_array);
subplot(1,2,2);
plot(x(k),y(k),'r-')
</code></pre>

<p>The same error occcures when using:</p>

<pre><code>DT=delaunayTriangulation(y_array',x_array');
[K,v]=convexHull(DT);
subplot(1,2,2);
plot(x(K),y(K),'r')
</code></pre>

<p><a href="https://i.stack.imgur.com/czCu2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/czCu2.png" alt="enter image description here"></a></p>