Question

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?

Homework Answers

Answer #1

Matlab Code:

w = pi/4;

H = (1+2*exp(-j*w) + exp(-2*j*w))/(1-0.8*exp(-j*w) + 0.64*exp(-2*j*w))
magnH = abs(H);
angleH = rad2deg(angle(H));

for n = 1:255
x(n) = cos(pi/4*n);
y(n) = magnH*cos(pi/4*n + angleH);
end
n = 1:255;
subplot(2,1,1)
stem(n,x)
ylabel('x(n)')
xlabel('time index n')
subplot(2,1,2)
stem(n,y)
ylabel('y(n)')
xlabel('time index n')

Output:

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
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?
In the study of Signal and System, it is important to understand the system characteristics such...
In the study of Signal and System, it is important to understand the system characteristics such as linearity, time invariance, stability, causality and invariability. In this experiment, write a function that uses inputs x1[n]=3?[n] and x2[n]=7?[n] to determine if the system output Y[n]={tan (3(pi)n/11)}2 + sin(6(pi)n/21) + cos(7(pi)n/21){x[n] + 1} represents the output of a linear system. Using MATLAB
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...
An LTI system has an impulse answer of h[n] = a^(n)H[n], H[n] is the Heaviside step...
An LTI system has an impulse answer of h[n] = a^(n)H[n], H[n] is the Heaviside step function. Obtain the output y[n] from the system when the input is x[n]=H[n]. 2. Consider the discrete system defined by> y[n] - ay[n-1] =x[n] Find the output when the input is x[n] = Kb^(n)H[n], and y[-1]=y_(-1)\ Find the output when the input is x[n] = K ẟ [n], and y[-1]=a Find the impulse response when the system is initially at rest. Find the Heaviside...
SIGNALS AND SYSTEMS Experiment 1    Signal Generation Date: January 1-8, 2018 The purpose of this...
SIGNALS AND SYSTEMS Experiment 1    Signal Generation Date: January 1-8, 2018 The purpose of this laboratory is to familiarize you with the basic commands in MATLAB for signal generation and verify the generated signal. Objectives 1.Learn basic MATLAB commands and syntax, including help system. 2.Use MATLAB ( from Citrix) to generate and plot different signals. Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes...
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...
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;...
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...