Matlab pwm function. To start the real-time execution, click Run in Real Time.