Get acquainted with using the Simulink Support Package to program the Arduino.
This example shows you how to make an LED increase and decrease gradually in brightness (fade effect).
A sine-wave block is used to implement the fading effect. As the amplitude of the Sine Wave varies, the volume/brightness of the buzzer/LED will vary.
For complete details, see the project here.
MATLAB 8.5 (R2015a)
MATLAB Search Path
Simulink Support Package for Arduino Hardware