Writing MATLAB Code for Embedded Control Applications