%% Play Audio File
% Load and play a sample audio file.
% Load  handel.mat into the workspace. The file contains a sample audio data array y and the sampling rate Fs.

load('handel.mat')
whos y Fs

% Create an audioplayer object to play the file.

player = audioplayer(y,Fs);

% Play the audio object on the default audio device.

play(player);

% Copyright 2018 The MathWorks, Inc.