Matlab program to generate Unit Step Sequence/Signal in discrete and continuous form.
Matlab code
clc;
clear all;close all;
u=ones(1,n); % defines an 1 x n matrix which is filled with ones
subplot(2,1,1);
plot(t,u);
axis([0 n+5 -2 2]);
ylabel('u(t)');
xlabel('Time->');
title('Graph for Unit Step Sequence [Continuous form]'); grid;
subplot(2,1,2);
stem(t,u);
axis([0 n+5 -2 2]);
ylabel('u[t]');
xlabel('Time->');
No comments:
Post a Comment