How can I implement this system in MATLAB and pass an audiow

How can I implement this system in MATLAB and pass an audio(wav) file through it? I am very lost and would appreciate any help

Solution

You will first need the following sound files,sace them and put these in a folder and make sure you use the pull down menu option File àSet Path to put that folder in the MATLAB path (or simply put the .wav files in your correct working directory.

road.wav

hootie.wav

lunch.au

flute.wav

tenorsax.wav

mutedtrumpet.wav

The first step is to design a filter to obtain the A and B vector coefficients.Then use the Butter function, for instance to obtain your signal(type Butter in your Matlab command window and you will find many other type of filters). Once you have obtained the B and A vector coefficients you can filter your signal using the function filter.

y=filter(x,A,B) x(is your input signal) and y your filtered signal.

Once you have filtered the signal you can calculate the spectral energy before and after filtering to find out if the filter has removed a significant part of your signal.

example:

DETERMINATION OF IMPULSE RESPONSE USING MATLAB

Syntax

[h,t] = impz(b,a)
[h,t] = impz(sos)
[h,t] = impz(d)
[h,t] = impz(...,n)
[h,t] = impz(...,n,fs)
impz(...)

Description

[h,t] = impz(b,a) returns the impulse response of the filter with numerator coefficients, b, and denominator coefficients, a. impz chooses the number of samples and returns the response in the column vector, h, and the sample times in the column vector, t. t = [0:n-1]\'and n = length(t) is computed automatically.

[h,t] = impz(sos)returns the impulse response for the second-order sections matrix, sos. sos is a K-by-6 matrix, where the number of sections, K, must be greater than or equal to 2. If the number of sections is less than 2, impz considers the input to be a numerator vector. Each row of sos corresponds to the coefficients of a second order (biquad) filter. The ith row of the sosmatrix corresponds to [bi(1) bi(2) bi(3) ai(1) ai(2) ai(3)].

[h,t] = impz(d) returns the impulse response of a digital filter, d. Use designfilt to generate d based on frequency-response specifications.

[h,t] = impz(...,n) computes n samples of the impulse response when n is an integer (t = [0:n-1]\'). If n is a vector of integers, impz computes the impulse response at those integer locations, starting the response computation from 0 (and t = n or t = [0 n]). If, instead of n, you include the empty vector, [], for the second argument, the number of samples is computed automatically.

[h,t] = impz(...,n,fs) computes n samples and produces a vector t of length n so that the samples are spaced 1/fs units apart.

impz(...) with no output arguments plots the impulse response of the filter.

impz works for both real and complex input systems.

How can I implement this system in MATLAB and pass an audio(wav) file through it? I am very lost and would appreciate any helpSolutionYou will first need the fo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site