% DT_plot_example.m % EE 313 Signals and Systems % Dr. Thomas P. Montoya clear; clc; close all % wipe the slate clean k = 0:1:8; % Define range of indices i=25*exp(-0.6*k); % Define current values stem(k,i,'r.','linewidth',1.5,'markersize',18), axis([-1 8 0 27]), % Manually set horiz. & vertical axis scales ylabel('i[k] (A)','fontsize',14,'fontname','times'), xlabel('k','fontsize',14,'fontname','times'), title('Discrete-Time Plot','fontsize',16,'fontname','times'), % Label some stems with the value of i[] for n=1:6, % can go to length(k) text(k(n)+0.0,i(n)+1.5,[' ' num2str(i(n),5)],'HorizontalAlignment',... 'center','VerticalAlignment','top','fontname','times') end set(findobj('type','line'),'linewidth',1.5,'markersize',18) set(findobj('type','axes'),'fontname','times','fontsize',12,'linewidth',2)