Professional Documents
Culture Documents
Cmos Vlsi Design
Cmos Vlsi Design
% Matlab 6.1
s = getaudiodata(y);
% 2. Play back
sound(s);
sound(s(length(s):-1:1))
plot(s);
sound(-s);
% 6. multiplied by a constant
sound(s/2)
sound(3*s.^2)
% non-linear distortion
sound(cbrt(s)/3)
% 9. Spectral content of signal
freqz(s,[1],[],8000);
ss = freqshift(s,8000,500);
sound(ss);
freqz(ss,[1],[],8000);
specgram(s,512,8000,[],512-32);
specgram(ss,512,8000,[],512-32);
filt = kaiserwinbp(2*pi*1/8,2*pi*1.01/8,2*pi*2/8,2*pi*2.1/8,0.001);
sf = filter(filt,[1],s);
specgram(sf,512,8000,[],512-32);
sound(sf)
filt = kaiserwinbp(2*pi*.5/8,2*pi*.51/8,2*pi*1/8,2*pi*1.01/8,0.001);
sf = filter(filt,[1],s);
specgram(sf,512,8000,[],512-32);
sound(sf)
sound(s(1:2:length(s)));
% But there are problems with this, aliasing.