title: Sound output levels in MATLAB
body: <p>Thanks to Yair Altman's <a href="http://www.mathworks.com/matlabcentral/fileexchange/25584" rel="nofollow">SoundVolume.m</a> I can control the system speaker output volume from  MATLAB. However, MATLAB's sound output is still at a far lower level than, say, a random YouTube video or the test sound in the Realtek HD audio manager (latest version, 6.0.1.6080). </p>
  
  <p>I'm using Windows 7, whose sound level controls are well known to be less than transparent, but MATLAB's own control in the Windows Volume Mixer is set to max -- yet MATLAB's sound level output is way less than anything else.</p>
  
  <p>Any suggestions? Here is what I'm using to play a sound (a 3kHz pure tone):</p>
  
  <pre><code>Fs = 22100;    
  x = 0:1/Fs:1;
  y = sin(2*pi*3000.*x);
  wavplay(y,22100)
  </code></pre>