% Create an array of 1000 time instants, in steps of 0.001 s.
time=[0:999]*0.001;
% Create a wave at frequency f
f=2; % Hz 
signal=sin(2*pi*f*time);
% Plot the signal
plot(time, signal);
% Annotations
title('Time Domain Sinusoid');
xlabel('Time (s)');
ylabel('Amplitude (V)');
