Matlab functions for a variety of tasks.