figure(1), clf
t= 1/20000*[1:100].';
plot(t,sin(2*pi*1000*t),'r'), xlabel('time [sec]')
ts= 1/5000*[1:25];
hold on, stem(ts, sin(2*pi*1000*ts)), hold off