The document discusses different types of functions in MATLAB:
1) Functions allow grouping code to perform tasks and operate in their own workspace separately from the base workspace. They can accept multiple inputs and outputs.
2) Anonymous functions can be defined inline without a file using the @ syntax.
3) Primary functions must be in a file but can call sub-functions defined there as well.
4) Nested functions are defined within another function and share its workspace. Private functions reside in a private subfolder and are only visible locally.
5) Global variables can be shared between functions by declaring them globally at the start of relevant files.