The MATLAB Function block allows you to add MATLAB functions to Simulink® models for deployment to desktop and embedded processors. This capability is useful for coding algorithms that are better stated in the textual language of MATLAB than in the graphical language of Simulink.
For an overview of using the MATLAB Function block to incorporate MATLAB code in a Simulink model, watch Incorporating MATLAB Algorithms into a Simulink Model (2 min, 4 sec).