You can expand the functionality of any custom block using callbacks and Handle Graphics.
Block callbacks perform user-defined actions at specific points in the simulation. For example, the callback can load data into the MATLAB® workspace before the simulation or generate a graph of simulation data at the end of the simulation. You can assign block callbacks to any of the custom block types. For a list of available callbacks and more information on how to use them, see Create Block Callbacks.
GUIDE, the MATLAB graphical user interface development environment, provides tools for easily creating custom user interfaces. See GUI Building for more information on using GUIDE.