In: Computer Science
Use the cumsum command in MATLAB to show that the cumulative sum of an impulse is a unit step function. Add a line to your code from Problem 2. Plot the unit step function generated by the cumsum command. Turn in a copy of the code and graph.
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
A = [0 1;-5 -2];
B = [0;3];
C = [0 1];
D = 0;
sys=ss(A,B,C,D);
[y,t]=impulse(sys);
Y=cumsum(y);
plot(t,Y);
title('Plot of step function using cumsum');
Kindly revert for any queries
Thanks.