><pre class="codeinput"><span class="comment">% Map a red star at the reference point:</span>
subplot(1,2,1)
plotps(-66.8575,143.5678,<span class="string">'rp'</span>,<span class="string">'markersize'</span>,12)

<span class="comment">% Calculate distance:</span>
d = pathdistps(lat,lon,<span class="string">'km'</span>,<span class="string">'ref'</span>,[-66.8575 143.5678]);

subplot(1,2,2)
plot(d,lon)
xlabel <span class="string">'distance relative to the grounding line (km)'</span>
ylabel <span class="string