title: What is the simplest way to remove phase angle discontinuities
body: <p>Say I'd like to plot a phase array </p>
  
  <pre><code>ph = [1, 40, 80, 179, -173, -150, -90, -40, -3, 3] on an X-Y plot.
  </code></pre>
  
  <p>The jump between [179, -173] is so hideous that I used mod(ph+360, 360) to get rid of it. This however makes [-3, 3] become [357,3]. </p>
  
  <p>I know I can have a loop to remove all discontinuities of this sort. But I wonder whether there's a more elegant way.</p>