How to Record Sound in Matlab

I want to record sound that comes over the SPEAKERS in an XP
machine with Matlab R12.1.

Fs = 8000;
y = wavrecord(5*Fs, Fs, 'int16');
wavplay(y, Fs);

only captures and plays noise, which I assume is due to sound-card's
line-in port is OPEN.

All assistance is greatly appreciated.

Thanks and Regards,