n class="comment">% Clip to eastern hemisphere:</span>
lat = lat(lon&gt;0);
lon = lon(lon&gt;0);

<span class="comment">% Plot for context:</span>
figure(<span class="string">'position'</span>,[100 100 800 400])
subplot(1,2,1)
bedmap2(<span class="string">'gl'</span>,<span class="string">'color'</span>,<span class="string">'black'</span>,<span class="string">'xy'</span>)
plotps(lat,lon,<span class="string">'b-'</span>)
</pre><img vspace="5" hspace="5" src="pathdistps_documentation_01.png" alt=""> <p>Calcula