Q1 filter function form is y myfilterxba where x is

Assignment Help Applications of MATLAB
Reference no: EM13347068

Q1 Filter function form is y = myfilter(x,b,a) where x is input, y is output and a and b are the IIR and FIR coefficients.

In the transfer function, the matrix "a" indicates the denominator coefficients and the matrix "b" is numerator coefficients.

I use command "global buffer;" to set a global variable as the shift buffer.

For a second order IIR filter, the transfer function is like:

362_IIR and FIR coefficients.png

Where w0 is stopband filter frequency, r is the stopband width.

1629_IIR and FIR coefficients1.png

The signal flow diagram is:

From the diagram, I work out the function in Matlab:
output=b(2)*buffer(1);
input=input-a(2)*buffer(1);
output=output+b(3)*buffer(2);
input=input-a(3)*buffer(2);
output=output+input*b(1);

When the output is figured out, the input is set to buffer(1) and the buffer(1) becomes buffer(2).
buffer(2)=buffer(1);
buffer(1)=input;

Q2

I use the command "load ('1104111.txt')" to load my ecg file. The signal minus 2048 to make it range from -2048mV to +2048mV.

And plot the original signal.

669_IIR and FIR coefficients2.png

To eliminate the 50Hz hum, so I make w0=2*pi*50/fs; r refers to the width of the stopband. And the closer r goes to 1, the more narrow is the stopband. I choose r=0.93.

Because it is a second order filter so the buffer contains 2 components.

To define the buffer in advance, I use the command of "global buffer;buffer=zeros(2,1);"

The coefficients a and b are:
b1=1; b2=-2*cos(w0); b3=1;
a1=1; a2=-2*r*cos(w0); a3=r^2;
b=[b1,b2,b3]; a=[a1,a2,a3];

Then a loop is used for filtering the whole signal.
op1=zeros(l,1);
for k=1:l
op1(k)=myfilter_3(ecg1(k),b,a);
end

Plot the result.

300_IIR and FIR coefficients3.png

Q3

In this section, the steps are similar with the Q2.
To eliminate the DC component, w0=0;
The other steps are almost same as the Q2.
The result is plotted as:

1982_IIR and FIR coefficients4.png

At last, to check the PQRST peaks, zoom in the plot

856_IIR and FIR coefficients5.png

Reference no: EM13347068

Questions Cloud

Write an essay on wifi performancewifi performancemuch has : write an essay on wifi performance.wifi performancemuch has been made of the improved performance offered by the
The british airways storythe story of british airways is : the british airways storythe story of british airways is one of the most widely used inspirational accounts of changing
Part 11how can internet technologies be involved in : part 11.how can internet technologies be involved in improving a process in one of the functions of business? choose
Q1 explain both resource base view rbv theory versus : q1 explain both resource base view rbv theory versus positioning theory and differences between both by providing
Q1 filter function form is y myfilterxba where x is : q1 filter function form is y myfilterxba where x is input y is output and a and b are the iir and fir
Ncor corporation- producing quality steel by stressing : nucor corporation- producing quality steel by stressing sound management practicesnucor corporation headquartered in
Case study a new campus for the university of rummidge a : case study a new campus for the university of rummidge a chance meeting between the leader of the town council of
Introductiona cyclic group is a special kind of group that : introductiona cyclic group is a special kind of group that has many similarities with modular arithmetic.taska. prove
Scm for profitable growthproblem statementthe comments by : scm for profitable growthproblem statementthe comments by greg hicks coo in the first paragraph really sums it up the

Reviews

Write a Review

Applications of MATLAB Questions & Answers

  Problem consider a trapezoidal piece of polymer film as

problem consider a trapezoidal piece of polymer film as shown below. the parallel sides of the trapezoid are insulated

  In a shell-and-tube heat exchanger one fluid passes through

in a shell-and-tube heat exchanger one fluid passes through a central tube while another fluid flows through an outer

  1 we want to find the integral of a function at an

1. we want to find the integral of a function at an arbitrary location x from the origin.nbsp thuswhere ix0 is the

  Write a matlab function speed planetary n emesh first last

write a matlab function speed planetary n emesh first last arm that computes the speed of a given link in a

  1 this problem is intended to demonstrate some problems

1. this problem is intended to demonstrate some problems that can arise from the finite precision of numerical

  Create the following graph which contains a piecewise

create the following graph which contains a piecewise function where a line exists in the first interval a parabola in

  1 given the following actual cpu burst for a tasknbsp 6 4 6

1. given the following actual cpu burst for a tasknbsp 6 4 6 4 13 13 13 and an initial best guess at the burst as 10

  Problem 1nbsp use matlab to answer the following system of

problem 1.nbsp use matlab to answer the following system of linear equations2x y 3z 1 2x 6y 8z 3 6x 8y 18z 5

  Implementation in matlab under windows to open a named pipe

implementation in matlab under windows to open a named pipe and to read data from the pipe an other program writes into

  P1 write the commands that will create the following matrix

p1 write the commands that will create the following matrix. you can use only special matrix commandsp2 two cars

  1 let pnx be the lagrange interpolating polynomial of

1. let pnx be the lagrange interpolating polynomial of degree at most n that satis?es pnxi yi i 0 1 2 . . . n.write

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd