Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ustep = unit step ------------ usamp = unit sample There are two ways to write this code : The first method is : y =

image text in transcribed

ustep = unit step ------------ usamp = unit sample

There are two ways to write this code :

The first method is :

y = [0 0]; n = -2:20; for k = 0:20 y(k+3)=(0.75).*y(k+2)-(0.125).*y(k+1)+usamp(k)+(0.5).*usamp(k-1); end stem(n,y) grid on;

The second method is:

n = -2:20; h = usamp(n) + (-3*(0.25).^n+ 4*(0.50).^n).* ustep(n-1); stem (n,h); grid on;

For this question I have done the first method and I want you to write it by using the 2nd method:

This is my code:

y = [1 -2]; n = -2:20; for k = 0:20 y(k+3)= 0.75*y(k+2) - 0.125*y(k+1) + ((0.1).^k).*ustep(k)+ (0.5*(0.1).^(k-1).*ustep(k-1)); end stem(n,y) grid on;

The figure for the code should look like this:

image text in transcribed

----------------------------------------------------------------------------------------------------------------

ustep = unit step ------------ usamp = unit sample

function out = usamp(t) out = 4*heaviside(t).*heaviside(-t); end

function out = ustep(t) out = heaviside(t)+ 0.5*usamp(t); end

x[n] yin! 92[n+1) 92[n] 91 [n+1) 9,16 For the block diagram system shown, obtain the output y[n] for the input x[n] =(0.1)*u[n] assuming initial conditions y[-1]=-2 and y[-2] =1. The work must be done first analytically and plotted using MATLAB for -25n520, and then by using a recursive computation carried out by MATLAB and plotted also. The two solution methods should yield the same result. 1 0.5 G ilreece 0 -0.5 - 1 -1.5 -2 -5 0 5 10 15 20 x[n] yin! 92[n+1) 92[n] 91 [n+1) 9,16 For the block diagram system shown, obtain the output y[n] for the input x[n] =(0.1)*u[n] assuming initial conditions y[-1]=-2 and y[-2] =1. The work must be done first analytically and plotted using MATLAB for -25n520, and then by using a recursive computation carried out by MATLAB and plotted also. The two solution methods should yield the same result. 1 0.5 G ilreece 0 -0.5 - 1 -1.5 -2 -5 0 5 10 15 20

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

Describe a typical interpersonal skills training program

Answered: 1 week ago

Question

=+10. How are inflation and unemployment related in the short run?

Answered: 1 week ago

Question

=+8. Why is productivity important?

Answered: 1 week ago