Wednesday, November 17, 2010
0
Step Wave Continous and Discrete
PROGRAM
% step discrete and continous
n=ones(1,20); % creates an array of 20 elements with value 1;
x=0:1:19;
subplot(211); %breaks figure window into 2*1 matrix and select 1st axis for current plot
stem(x,n); %discrete step wave
title('discrete step');
xlabel('time');
ylabel('amplitude');
subplot(212); %breaks figure window into 2*1 matrix and select 2nd axis for current plot
plot(x,n); %continous sine wave
title('continous step');
xlabel('time');
ylabel('amplitude');
n=ones(1,20); % creates an array of 20 elements with value 1;
x=0:1:19;
subplot(211); %breaks figure window into 2*1 matrix and select 1st axis for current plot
stem(x,n); %discrete step wave
title('discrete step');
xlabel('time');
ylabel('amplitude');
subplot(212); %breaks figure window into 2*1 matrix and select 2nd axis for current plot
plot(x,n); %continous sine wave
title('continous step');
xlabel('time');
ylabel('amplitude');
OUTPUT
This post was written by: noufel n backer
Subscribe to:
Post Comments (Atom)
0 Responses to “Step Wave Continous and Discrete”
Post a Comment