clear all
close all


recObj = audiorecorder(16000, 16, 2);
get(recObj);

%record audio for 10 seconds
recordblocking(recObj, 10);

myRecording = getaudiodata(recObj);

wavwrite(myRecording, 16000, 'RecordedH.wav')

[y, fs, nbits, opts] = wavread('RecordedH.wav'); %read in the wav file

timePlot(y, fs);

magPlot(y, fs);
