% Set number of points in waveform. if(~exist('N')) N = 128; end % Create vector of time values. t = 0:3.2/N:3.2; % Generate speechlike waveform s = 5*exp(-t).*sin(2*1.3*pi*t) ... + 3*exp(-2*t).*sin(2*3.4*pi*t) ... + exp(-3*t).*sin(2*7.2*pi*t); figure(1) plot(s) figure(2) plot(abs(fft(s))) % Low values of N, such as N=16, illustrate aliasing and blurring % of spectrum.