MATLAB: Adding noise to a wav file

noisesoundwav

if I add noise to the script…
load handel.mat;
hfile= 'handel.wav';
wavwrite(y, Fs, hfile);
nsamples=Fs;
[y, Fs , nbits, readinfo]= wavread(hfile,nsamples);
sound(y(round(2.85/4*end):end),Fs);
How would I do so, I know I need some kind of vector to do it but I dont know how to approach it

Best Answer

y = y + randn(size(y));