File Exchange

image thumbnail


version (1.65 KB) by Brett Shoelson
Returns a vector of starting positions and a size for uniformly spaced objects.


Updated 10 Dec 2003

View License

This is a VERY simple, but very useful few-line program that calculates the starting points and size of uniformly spaced (GUI) objects. Use this function, or write your own--but you should have a distribute function if you manually create GUIs (without the development environment, which has a distribute function).


(Enter the number of objects, starting and end points, and gap size, and position your objects horizontally or vertically at objpos(1), objpos(2),..., and with a width/height of objdim.)

Cite As

Brett Shoelson (2020). distribute (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux