1. Only version not older than R2013 supports Raspberry Pi. First, download support package in Matlab:
http://www.mathworks.cn/matlabcentral/fx_files/40313/5/raspberrypi.zip
2. Open raspberrypi.mlpkginstall in Matlab, and just follow the instructions, you will get everything ready.
3. After installation, get your Pi connected into the router in your home, and remember the IP address in management page, because Matlab connecting Pi via SSH.
4. Open Simulink in Matlab, add a new model, configure SinWave and Gain.
5. Open Model Configuration Parameters, or Ctrl+E.
Configure the IP address , user name is pi, password is raspberry.
6. Configure simulation, time is inf, device is External.
7. Run it.