close all; clear all;
x = [];

%% Parameters
% F = vector of frequency values for the waveform sequence
% Rs = symbol rate
%%

F = 3*[1 2 3 4]; Rs = 1;                % FSK Codebook Example 1
%F = 3*[4 4 1 4 3 1 2 3 4 4]; Rs = 1;    % FSK Example 1 (in slide)
%F = 3*randi(4,1,10); Rs = 1;            % FSK Example 1 (random)
%F = 100*[4 4 1 4 3 1 2 3 4 4]; Rs = 1;  % FSK Example 2 (audible) (in slide)
%F = 100*randi(4,1,10); Rs = 2;          % FSK Example 2 (audible) (random)

for f = F
    [x,Ts] = addToneAF(x,1,f,1/Rs);
end
plotspec(x,Ts)
xlim(2*max(F)*[-1 1])
sound(x,1/Ts)
