clc
close all
clear

Ts = 0.001; %seconds - sample period
t = 1:1:1000;
t = t*Ts;  % time in seconds used in the plot below
f = 5;  % frequency in Hz
omega = 2*pi*f;  % frequency in Hz

for i = 1:1000
    y(i) = sin(2*pi*f*i*Ts);
end

plot(t,y,'b','LineWidth',2, 'MarkerSize',10);
% The "b" means use a blue line
% The thickness of the line is set by "LineWidth" value
% which is 2 in this example
set(gca,'FontSize',12)
title('Sin(t) vs. Time','FontSize',12)
ylabel('Sin(t)','FontSize',12)
xlabel ('Time in seconds','FontSize',12)
grid on;
%

figure  % Put the next plot on a new figure 
Ts = 0.001; %seconds - sample period
t2 = 1:1:1000;
t2 = t2*Ts;  % time in seconds used in the plot below
f2 = 10;  % frequency in Hz
omega2 = 2*pi*f2;  % frequency in Hz

for i = 1:1000
    y(i) = sin(omega2*i*Ts);
end

plot(t,y,'--r','LineWidth',2, 'MarkerSize',10);
title('Sin(t) vs. Time','FontSize',12)
ylabel('Sin(t)','FontSize',12)
xlabel ('Time in seconds','FontSize',12)
grid on;
set(gca,'FontSize',12)

figure  % Put the next plot on a new figure 
Ts = 0.05; %seconds - sample period
t3 = 1:20;
t3 = t3*Ts;  % time in seconds used in the plot below
f3 = 1;  % frequency in Hz
omega3 = 2*pi*f3;  % frequency in Hz

for i = 1:1:20
    y3(i) = sin(omega3*i*Ts);
end
%
plot(t3,y3,'--mo','LineWidth',2, 'MarkerSize',10);
set(gca,'FontSize',12)
% The "--" means use a dashed line
% The "m" means use the color magenta
% The "o" means use markers in the shape of circles
% The size of the markers is set using "MarkerSize"
title('Sin(t) vs. Time','FontSize',12)
ylabel('Sin(t)','FontSize',12)
xlabel ('Time in seconds','FontSize',12)
grid on;

