% sampling


t=linspace(0,1,10001);
t=t(1:end-1);
T=t(2)-t(1);
Tm=0.05;
t_dis=[t(1:Tm/T:end) t(end)];
figure(10);hold off;
plot(t,sin(2*pi*1*t),'b','LineWidth',2);grid on;hold on;
plot(t_dis,sin(2*pi*1*t_dis),'ro','MarkerFaceColor',[1 1 1],'LineWidth',2);
xlabel('tiempo (s)');
ylabel('(V)');
figure(11);hold off;
stairs(t_dis,sin(2*pi*1*t_dis),'LineWidth',2);grid on;hold on;
plot(t_dis,sin(2*pi*1*t_dis),'ro',...
    'MarkerFaceColor',[1 1 1],'LineWidth',2);
xlabel('tiempo (s)');
ylabel('(V)');
