Calculate several samples of t

Calculate several samples of the unit impulse and impulseresponses of y(n) = -0.75 y(n–1) + x(n) – 0.3 x(n–1) – 0.4x(n-2).

Re-write the equation in standard formand then indicate the name of eachcoefficient (a1, etc.). Use the filter() function inMATLAB to check your results to 1 and 2.

Code:

N =10; % number of samples

%% unit impulse

x_1 = 0; % x(-1)

x0 = 1;

for n = 1:N-1

x(n) = 0;

end

d = 1;

% in MATLAB index zero won’t exist

% d is for adjusting MATLAB index

% so in below line y(0+d) is true value of y(0)

y(0+d) = 1; % Initial condition assumption

%% impulse response

y(1+d) = -0.75*y(0+d)+ x(1) – 0.3*x0 – 0.4*x_1;

y(2+d) = -0.75*y(1+d)+ x(2) – 0.3*x(1) – 0.4*x0;

for n=3:N-1

y(n+d)= -0.75*y(n-1+d) + x(n) – 0.3*x(n-1) – 0.4*x(n-2);

end

y

%% Filter

b = [ 1 -0.3 -0.4]; %

a = [1 0.75]; %

X = [1, zeros(1,N-1)];

Y = filter(b,a,X)

% subplot(2,1,1)

% plot([0:N-1],y)

% title(‘equation response’)

% subplot(2,1,2)

% plot([0:N-1],Y)

% title(‘filter output’)

Output:

Response from equation

Responsefrom filter()

"Our Prices Start at \$11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"

Pages (275 words)
Standard price: \$0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back