This video shows the steps to convert a sine wave into square wave. It first shows the steps to do it using simple simulink model. Then it shows the use of MATLAB Function block. Towards the end it shows the steps to generate the Square wave form using Level-2 S-Function block.
We will be glad to hear from you regarding any query, suggestions or appreciations at: firstname.lastname@example.org