fitpath

Gracefully truncate a file path to fit into uicontrols.

You are now following this Submission

This is a simple utility to gracefully fit a file path into a uicontrol by replacing some of the directory names with '...'.

It was primarily developed as a tutorial on how to use the extent property of uicontrols. The full tutorial can be found at our website.

Cite As

Erik Newton (2026). fitpath (https://www.mathworks.com/matlabcentral/fileexchange/13915-fitpath), 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.1.0.0

Just updated tag list

1.0.0.0

Now with added command line help.