Wednesday, July 15, 2009

Exponential sequence (0.7)^n

% Plot an exponential sequence (0.7)^n and level it.
% *************************************************

N=20;
n=0:1:N-1;
xn=0.7.^n;
subplot(2,1,1),stem(n,xn);
subplot(2,1,2),plot(n,xn);
xlabel('n');
ylabel('xn');
title('Exponential Sequence');

No comments: