%% Sinusoidal signal code
% Sampling frequency (in Hz).
fs = 100;
% Frequency of the signal (in Hz)
f_signal = 3;
% Length of the signal (in seconds).
dur_sig = 3;
% Time vector.
t = linspace(0,dur_sig,fs*dur_sig);
% Signal
sig_sin = sin(2*pi*f_signal*t);
% Plot
figure(), hold on,
plot(t,sig_sin),
stem(t, sig_sin),
hold off,
xlabel('Time (s)'), ylabel('Amplitude'),
legend({'Pseudocontinuous','Discrete'}),

%% Calcular: valor medio (Vm), potencia (P) y energía (E) de la señal (sig_sin).
% Vm = ...;
% P = ...;
% E = ...;