Question

Exercise 3 -This small programming exercise is on algorithms and thir implementation with MATLAB. You are to program in MATLA

0 0
Add a comment Improve this question Transcribed image text
Answer #1

close all,
clear all,
clc,

ProjectPath = pwd;
SoundFilePath = strcat(ProjectPath,'\TrainWhistle.wav');

[soundfile, Fs, nbits] = wavread(SoundFilePath);


b = fir1(200,.03,'low');
y=filter(b,1,soundfile);
size(soundfile)
size(y)
x=cat(1,soundfile,y);

freqz(b,1,512)

subplot(3,1,1);
plot(soundfile);
xlabel('--- Time (secs.) --->');
ylabel('--- Amplitude --->');
str=strcat('Time Plot of Voice Signal at Sampleing Rate = ',num2str(Fs));
title(str);

subplot(3,1,2);
plot(y); title('Echo');
subplot(3,1,3);
plot(x); title('Original Sound + Echo');
wavplay(x)

Time Plot of Voice Signal at Sampleing Rate 48000 17 Time (secs.) -- Echo x 10° 0.4 0.2 0.2 4 10 x 10 Original Sound +Echo 0.50 100 150 09 08 07 0.5 200 0.4 0.3 0.2 0.1 Normalized Frequency (xn rad/sample) 200 800 09 0.8 n 2 0.5 0.4 -1000 03 0.1 0.2

Add a comment
Know the answer?
Add Answer to:
Exercise 3 -This small programming exercise is on algorithms and thir implementation with MATLAB. You are...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Design a matlab code that: 1-play sound 2- add noise to the sound 3- filter the...

    Design a matlab code that: 1-play sound 2- add noise to the sound 3- filter the noised signal using fir or iir filter Note: FIR: Finite impulse response filter IIR: Infinite impulse response filter Please make code simple. don't copy other from other codes.

  • These are my matlab problems. Would you please show me the matlab code? Thank you so much We are developing a reverb. 2...

    These are my matlab problems. Would you please show me the matlab code? Thank you so much We are developing a reverb. 2.1 Design an IIR comb filter, whose transfer function is given by where M is the delay and g is the gain. Plot the frequency response, group delay and the impulse response (the first few samples) for some values of M an g. 2.2 Design an all-pass filter, whose transfer function is given by Plot the frequency response,...

  • Discrete Time Signal Processing Question 1. Consider an IIR filter A(1-2-1 cos ω0) 1-2cos ω02-1+2...

    Discrete Time Signal Processing Question 1. Consider an IIR filter A(1-2-1 cos ω0) 1-2cos ω02-1+2 I. Compute its impulse response using the difference equation with an impulse signal δ(n) as the input. Use trigonometric identities to simplify the result as much as you can 2. Draw the diagram showing the implementation of this filter in terms of adders, delays and multipliers Note: The IIR filter above generates a cosinusoidal signal when an impulse signal is applied at its input.] Question...

  • please answer all the question and print matlab code You need to design bandpass filter with lower cutoff freq. of 1000Hz and upper cutoff freq. of 3000Hz. Sampling freq. 10000Hz. Plot the freq. respo...

    please answer all the question and print matlab code You need to design bandpass filter with lower cutoff freq. of 1000Hz and upper cutoff freq. of 3000Hz. Sampling freq. 10000Hz. Plot the freq. response in DB .Use MATLAB as needed a) FIR with Hamming window at least 7 taps b) IIR using Bilinear Transformation method not more than 2end order. c) Compare the frequency response “freqz” plots and which method you recommend and why? 2 graphs on this part. d)...

  • Can someone please help me with this, I'm really stuck. here a sample code provide for the matlab...

    can someone please help me with this, I'm really stuck. here a sample code provide for the matlab: clear all; close all; % ---------- (a) ---------- a = 0.7; % attenuation coef. D = 5; % digital time delay UnitImpulse = [1 zeros(1,???)]; % creat unit impulse, starting from n=0; x = UnitImpulse; y = filter(1, [1 zeros(1, D-1) -a], x); % help filter, do you know the usage of filter() now? n = 0:(length(y)-1); % check length of y[n]...

  • Use MATLAB to: Design an Echo Filter. The output should be the original signal followed by...

    Use MATLAB to: Design an Echo Filter. The output should be the original signal followed by three echoes with attenuations of 10%, 15 % and 25% respectively and the delays should be 0.9 sec, 1.4 sec, and 1.8 sec respectively for each echo. Hint: Based on this information the original signal appears at the output with the same amplitude, the first echo has amplitude 0.9 times the amplitude of the original (10% attenuation), the second echo has amplitude 0.85 (15%...

  • Implementing a 3-Band Equaliser

    Design and implement a 3-band equaliser using a DSP board or MPLab/CSS. The  MATLAB Filter Designer could be used for filter design and graphing subject to  the design requirements given below. This is an individual CW 2. Equaliser Primer An n-band equaliser is a device used to correct the frequency response  characteristic of a signal processing system. Equalisers can be implemented using  digital or analogue filters. The whole bandwidth of the equaliser is divided into n  frequency bands, which can...

  • [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the...

    [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the given script file(bands_cutoff). This program should be able to process any sound(.wav) file. Then, graph the band-passed signals and amplitude envelopes extracted(after rectification and low-pass filtering) and waveforms of the original sound and vocoded sound. Additionally, using the output of the script file, make spectrograms of the original sound and the synthesized sound. Bandpass filter Modulation Band-limiting Envelope detection BPF RECT LPF BPF sine...

  • [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the...

    [MATLAB Scriptfile task] Design N-band tone vocoder with a given figure (below) in MATLAB implementing the given script file(bands_cutoff). This program should be able to process any sound(.wav) file. Then, graph the band-passed signals and amplitude envelopes extracted(after rectification and low-pass filtering) and waveforms of the original sound and vocoded sound. Additionally, using the output of the script file, make spectrograms of the original sound and the synthesized sound. Bandpass filter Modulation Band-limiting Envelope detection BPF RECT LPF BPF sine...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT