GENERATION OF UNIT STEP FUNCTION AND SEQUENCE

clc;
close all;
clear all;
x=0:1:5;
y=1.^x;
subplot(2,1,1);
plot(x,y);
xlabel('x');
ylabel('u(x)');
title('Unit Step Function');
grid on;
subplot(2,1,2);
stem(x,y);
xlabel('n');
ylabel('u(n)');
title('Unit Step Sequence');
grid on;

Output:

No comments:

Post a Comment