clear; clc; close all;

x = linspace(0, 2 * pi, 30);
y = sin(x);
z = cos(x);

% figure;
% plot(x, y);
% xlabel('Time (s)');
% ylabel('Signal (volt)');
% 
% figure;
% plot(x, z);
% xlabel('Time (s)');
% ylabel('Signal (volt)');

figure; hold on;
for i = 1 : length(x)
    clf;
    h = plot(x(1 : i), y(1 : i), 'o--', 'color', [0.93, 0.69,0.13]);
    set(h, 'linewidth', 3);
    grid on;
    axis([0, 2 * pi, -1, 1]);
    pause(0.5);
end
xlabel('Time (s)');
ylabel('Signal (volt)');



