Question

Write a MATLAB function that implements the difference equation for the system assuming null initial conditions....

Write a MATLAB function that implements the difference equation for the system assuming null initial conditions. Include source code .

y(n) = x(n) + 2x(n-1) + x(n-2) + 0.8 y(n-1) - 0.64 y(n-2)

Use Matlab to calculate the response of the system to p(n) = 0 for all n expect when p(10) = 1.

Using stem, plot the resulting output to n=100

What is the amplitude of the output squence? Was the signal amplified? How much?

Homework Answers

Answer #1

code for output response in below

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

%input described in question is a unit inpulse function shifted 10 unit
x=zeros(100,1);
x(10)=1; % delta(n-10)
y=[0 0]; % response
for n=3:100
y=[y,x(n) + 2*x(n-1) + x(n-2) + 0.8*y(n-1) - 0.64*y(n-2)]; %difference equation
end
stem(y,'filled'); % plot output response

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

plot

in above plot, we can see that amplitude of the output is above 2.5 which dies out after some time thus it is amplified.

Know the answer?
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
Similar Questions
Using Matlab to obtain the output squence that results when you use k(n) = cos(pi*n/4) as...
Using Matlab to obtain the output squence that results when you use k(n) = cos(pi*n/4) as the input. y(n) = x(n) + 2x(n-1) + x(n-2) + 0.8y(n-1) - 0.64y(n-2) Plot (stem) the resulting output. n=255 Amplitude? Was the signal amplified through the system? By how much?
Problem 1 Consider the discrete-time LTI system characterized by the following difference equation with input and...
Problem 1 Consider the discrete-time LTI system characterized by the following difference equation with input and initial conditions specified: y[n] - 2 y[n-1] – 3 y[n-2] = x[n] , with y[0] = -1 and y[1] = 0, x[n] = (-1/2)n u[n-2]. ? Write a MATLAB program to simulate this difference equation. You may try the commands ‘filter’ or ‘filtic’ or create a loop to compute the values recursively. ? Printout and plot the values of the input signal, x[n] and...
For the system given by the difference equation below: Y(n) – (3/2).Y(n-1) – Y(n-2) = -(5/2)....
For the system given by the difference equation below: Y(n) – (3/2).Y(n-1) – Y(n-2) = -(5/2). X(n-1) Find the transfer function H(z). You will need to do this manually. Find the poles and zeros of H(z). You can do this manually or use MATLAB. Plot the poles and zeros in MATLAB Is the system stable? Plot the impulse response of the system using MATLAB Plot the Step Response of the system using MATLAB Plot the frequency response of the system...
1. Write a MATLAB function to determine the discrete-time Fourier Transform (H(?)) of the following sequence....
1. Write a MATLAB function to determine the discrete-time Fourier Transform (H(?)) of the following sequence. Plot its magnitude and phase. You can use the dtft command and use the abs, angle and plot commands to plot the results. x(n) = {4, 3, 2, 1, 2, 3, 4}. 2. Analytically determine H(z) and plot its magnitude and phase for the following system using freqz. y(n) = 2x(n) + x(n ? 1) ? 0.25y(n ? 1) + 0.25y(n ? 2). 3....
System 3 : Consider the discrete time system represented by the following difference equation: y(n) ?...
System 3 : Consider the discrete time system represented by the following difference equation: y(n) ? x(n) ? x(n ? 2) ? 0.8y(n ?1) ? 0.64 y(n ? 2) a) Draw the corresponding BLOCK DIAGRAM b) Obtain the TRANSFER FUNCTION, H(z) , for this system.   c) Calculate and plot the POLES and ZEROS of the transfer function. d) State the FREQUENCY RESPONSE Equation ,  H(ej? ) , for this system.    System 4 : Consider the discrete time system represented by...
PLEASE ANSWER QUESTION #2 Design an FIR band-pass filter with cutoff frequencies of π/ 4 and...
PLEASE ANSWER QUESTION #2 Design an FIR band-pass filter with cutoff frequencies of π/ 4 and π/ 6 . The filter’s impulse response should have 81 samples (i.e. N = 81). Use a Blackman filter window. (a) Plot the filter’s impulse response (b) Plot the magnitude of the filter’s frequency response, in dB. (i.e. 20 log(|H(e jω)|)) (c) Print out the MATLAB code used in the filter design 2. Use the filter designed in #1 to filter a random input...
using matlab Write your own routine for Gaussian elimination without any pivoting. Input for the routine...
using matlab Write your own routine for Gaussian elimination without any pivoting. Input for the routine should consist of the number (n) of equations and the augmented matrix. Output should be the vector solution of the system. Test your code by using it to solve the following two problems: a) x + y + w + z = 10, 2x + 3y + w + 5z = 31, −x + y − 5w + 3z = −2, 3x + y...
Write a MATLAB function and test bench script code to solve the above simple RL/RC circuits...
Write a MATLAB function and test bench script code to solve the above simple RL/RC circuits by following the instructions noted below. The input signal and impulse response generation should be done in the function. The test bench script should be used only to call the function and for signal plotting purposes. No plotting should be done inside the function itself. Name your function L2_C Instructions: Input voltage ,x(t), can be AC or DC. Consider a variable ‘w1’ which can...
Problem 1....... you can use Matlab The following Scilab code generates a 10-second “chirp” with discrete...
Problem 1....... you can use Matlab The following Scilab code generates a 10-second “chirp” with discrete frequencies ranging from 0 to 0.2 with a sampling frequency of 8 kHz. clear; Fs = 8000; Nbits = 16; tMax = 10; N = Fs*tMax+1; f = linspace(0.0,0.2,N); x = zeros(f); phi = 0; for n=0:N-1 x(n+1) = 0.8*sin(phi); phi = phi+2*%pi*f(n+1); end sound(x,Fs,Nbits); sleep(10000); //allows full sound to play Add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the...
Problem 3 you can use Matlab and also i give u the Problem 1 code its...
Problem 3 you can use Matlab and also i give u the Problem 1 code its on Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandpass filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce this is the Problem 1 code and the solutin clear; clc;...