sr = 44100; % the sample rate in Hz
f = 500; % the frequency of the tone in Hz
d = 1; % Sound duration in sec
t = linspace(0, d, sr*d); % a time vector
tone = sin(2*pi*f*t);
softer_tone = tone * 10^(-10/20);

if ispc
    wavplay(tone, sr, 'sync');
    wavplay(softer_tone, sr);
elseif ismac
    sound(tone, sr);
    sound(softer_tone, sr);
end