As Walter mentioned, Fixed-Point Designer provides fixed-point support for MATLAB, Simulink, Stateflow, Embedded Coder, HDL Coder, and other MathWorks products.
Walter gave you an excellent link for getting started with fixed-point in MATLAB using fi objects.
Simulink fixed-point intro
In Simulink, fixed-point support is integrated into a wide selection of blocks. The demo fxpdemo_dbl2fix.slx is a nice first step in using fixed-point in base Simulink blocks.
Open the model fxpdemo_dbl2fix. (see image below).
Double click on the Convert block with name "Dbl-to-FixPt".
To the right of the "Output data type" parameter, click " << " to open data type assistant.
Change the word length to 32 bits.
Change the fraction length to 20 bits.
Set signedness to signed or unsigned as needed.
Click Apply button.
Simulate the model by clicking the green Run triangle at the top of the model.
On the signal line coming out of the "Dbl-to-FixPt" convert block, you should see
"sfix32_En20" or "ufix32_En20" depending on whether you picked signed or unsigned.
You've now completed the first step in modelling your 32 bit fixed-point data type with 20 fractional bits!
Fixed-point math handled automatically
Based on the input and output types used, all the details of fixed-point math are automatically handled by fi MATLAB objects and Simulink blocks. Simulation with Simulink and MATLAB, analysis with Simulink Design Verifier, and code generation with Embedded Coder or HDL Coder all handle the needed details and give bit-true agreement with each other.
The following image shows the demo model fxpdemo_feedback.slx doing a collection of math on a mixture of fixed-point types.