% 22.3MB1 Fall 01
% Yvan Petillot
% Code to visualise time varying scalar (timevarscal)

clear; close all;
 
% Set graphics parameters.
axis([0 10 -10 10]);
hold on;
title('Time-varying Scalar: s_2 = 10cos(\omega t + 30^o)');
xlabel('\omega t');
ylabel('s_2');


for t = 0 : 0.1 : 10 
    % Coefficients
    s = 5*cos(pi*t+pi/6);
    
    cla;
    plot(t,s,'-o');
    pause(0.1);
   
 end;
hold off

