GDIST

Display distance and azimuth between two points on a figure

You are now following this Submission

GDIST is a simple GUI to display x, y, distance and bearing for two points on a 2D figure. If no inputs are supplied, the information will be displayed on the current axis. To use the tool, simply type gdist at the command window when a figure is open. Click on the starting point, hold down the button and move the mouse to new location. Release the mouse when finished. The units displayed in the distance window are the same as the figure axis. The azimuth is reported in compass degrees (ie. geographic).

Example:

[X,Y,Z]=peaks(50);
figure
surf(X,Y,zeros(size(Z)),Z)
view(2)
gdist

Cite As

Andrew Stevens (2026). GDIST (https://se.mathworks.com/matlabcentral/fileexchange/21884-gdist), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0