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...
b) y[n] – 0.9y[n-1] +0.08y[n-2] = x[n] For the system given by (b), plot its output...
b) y[n] – 0.9y[n-1] +0.08y[n-2] = x[n] For the system given by (b), plot its output y[n] for only n=0,1,2,…,5, for an input x[n] = nu[n] by assuming that the system was at rest before the input was applied.
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...
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...
please, write the mathematical definition of each system . (System1, System2, System3,System4,System5),the code is written in...
please, write the mathematical definition of each system . (System1, System2, System3,System4,System5),the code is written in matlab. thanks if sysnum==1 % System #1 y=x-4; elseif sysnum==2 % System #2 y=n.^2.*x; elseif sysnum==3 % System #3 y=-(x.^2); elseif sysnum==4 % System #4 y=cos(2*pi/3-pi/7)*x; elseif sysnum==5 % System #5 b=[-1 4 -1]; for ni=1:length(n) y(ni)=0; for k=0:length(b)-1; if (ni-k)>=1 y(ni)=y(ni)+b(k+1)*x(ni-k); end end end else % Error: invalid system number error(['labsys: Invalid system. Input sysnum must be 1, 2, ' ... '3, 4...
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...