Question: Example: 1. Plot unit step sequence for n= -5: 10 u [n-n0] = 1 n n0 0 n < n0 Where n0 = 0. 2

Example: 1. Plot unit step sequence for n= -5: 10

u [n-n0] = 1

n n0 0 n < n0

Where n0 = 0. 2

n1=-5:-1;

n2=0:10; n=[n1 n2];

u=[zeros(1,length(n1)) ones(1,length(n2))];

figure(1),

stem(n,u)

xlabel('n')

ylabel('u[n]')

title('unit step function')

%% Plotting u[n] for non-zero interval

n3=0:10;

v=ones(1,length(n3));

figure(2),

stem(n3,v)

xlabel('n')

ylabel('u[n]')

title('unit step function')

Exercise: 1. Generate two sequences x[n] and y[n], and convolve the two sequences. Plot the two sequences and their convolution on a sheet of paper for each problem. (Use subplot and stem functions). Write signals for non zero interval only.

(a) x(n) = u(n) u(n 10) y(n) = u(n) u(n 5)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!