Switching sounds on left or right speakers

Hi,
I would like to ask if MATLAB is capable of controlling the
presentation of sounds (wav or beep) to just one speaker and switch
between the two?

WAVPLAY(y(:,2),Fs);
would play sound from the 2nd channel of the wav file but on both
speakers.

WAVPLAY(y(:,:),Fs);
would play both channels on their respective speaker separately.

Is that a way to play channel 2 on the left speaker only??

Thanks.

Cristy
If the matrix passed to wavplay is Nx1 - it's played to both channels.
Try the following (w is the wave):


left = [w(:,1), zeros(size(w,1),1)];
right = [zeros(size(w,1),1), w(:,2)];

wavplay(left);
wavplay(right);

Good luck!