Professional Documents
Culture Documents
Ashish DSP
Ashish DSP
Ashish DSP
aposition = 1
b= 1 1 1 1
bposition = 1
aposition = 1
bposition = 4
Output of filter.
Program 8(ii)- genralisation of audio signal with filter. % Record your voice for 10 seconds. myVoice = audiorecorder; %making audio recorder object. disp('Start speaking.') recordblocking(myVoice, 10); disp('End of Recording.'); % Play back the recording. play(myVoice); % Store data in double-precision array. mydata = getaudiodata(myVoice); subplot(3,1,1),plot(mydata); % Plot the waveform. xlabel('t'); % labeling x and y axis. ylabel('x(t)'); title(audio signal); mydata1=awgn(mydata,20); subplot(3,1,2),plot(mydata1); % labeling x and y axis. xlabel('t'); ylabel('x(t)'); title(noise added signal); a=[1/7 1/7 1/7 1/7 1/7 1/7 1/7]; %filtering the noise added signal with order 1 filter. f=filter(a,1,mydata1); subplot(3,1,3) plot(f) %plot yhe signal. xlabel('t'); % labeling x and y axis. ylabel('x(t)'); title(filtered signal);