O >54683555656_CAB1CF21-E5CE-4446-9D4A-D241597... Open with Photos te points (Ma
ID: 2292395 • Letter: O
Question
O >54683555656_CAB1CF21-E5CE-4446-9D4A-D241597... Open with Photos te points (MatLab Onty D The transfer fanction of a system is given bys 0.515lz3-0.1452-2-0.2963s+ 0.0528 //(#)--'-1.8528z3+1.590622-0.6642z + 0.0528 Evaluate h(k) for k = 0 to 40 and show the discrete plot of h(k) for Label each axis, place your name, grid and title on the graph. Evaluate the output of the system c(k) for k- 0 to 40 fo show the diserete plot of e(k) for k grid and title on the graph. a) r a unit step input 0 to 40. Label each axis, place your na b) Reference: Lecture 2 Notes.Explanation / Answer
Here is the matlab code for problem 1 and problem 2. Please change the titles of the figures in title command in the script.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
%% assignment.m
clc;
clear;
close all;
num = [0.515 -0.1452 -0.2963 0.0528];
den = [1 -1.8528 1.5906 -0.6642 0.0528];
sys = tf(num,den,1);
k=0:40;
%% problem 1.a:
a=impulse(sys,40);
stem(k,a);
title('Response of h(k)');
xlabel('K');
ylabel('Response');
grid on;
%% problem 1.b:
figure
b=step(sys,40);
stem(k,b);
title('Step Response of h(k)');
xlabel('K');
ylabel('Response');
grid on;
%% problem 2:
ssSys = ss(sys);
disp('A:')
display(ssSys.A);
disp('B:')
display(ssSys.B);
disp('C:')
display(ssSys.C);
disp('D:')
display(ssSys.D);
c=step(ssSys,40);
figure('Name','myName');
stem(k,c);
title('Add your title here');
xlabel('K');
ylabel('step response');
grid on;
-----------------------------------------------------------------------------------------------------------------------
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.