% Create WAV file in current folder.
clc
clear all
close all

load handel.mat
 f = sin(t*pi);
 
hfile = 'handel.wav';
wavwrite(y, Fs, hfile)
clear y Fs
 
% Read the data back into MATLAB, and listen to audio.
[y, Fs, nbits, readinfo] = wavread(hfile,'native');

% Play wav file 
player = audioplayer(y, Fs);
play(player);