plot use mat lab -5<n<5
x1[n] =u[n-2]
Here is the Matlab code to plot . Copy and paste the code below in the MATLAB window and hit enter, MATLAB will give you the plot
n = -5 : 5;
y = heaviside(n-2);
stem(n, y)
axis([-10 10 -1 5])
Explanation of code
n = -5 : 5;:This line represents range of the horizontal axis time instants
y = heaviside(n-2);: This represents the shifted unit step sequence
stem(n, y): It is a command to discrete plot
axis([-10 10 -1 5]): It shows the range of horizontal and vertical axis
Thumbs me up, Please
Get Answers For Free
Most questions answered within 1 hours.