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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started