clear all
N = 16000;
%% 1. Fill up these fields based on the instrunction.
fs =                     %%% sampling freq. Hz
fDesired =               %%% desired freq. Hz
w0 =                    %%% discrete-time freq.
N0 =                     %%% fundamental period

%% 2. Compute N samples of the cosine signals using "function call" 
y_cos = zeros(1,N);
phase = 0;

for i=1:N
    % Define a phase increment here
    % Increase the phase by the increment
    
    
    y_cos(i) = % store the corresponding cosine value
end

%% 3. Compute N samples of the cosine signals using "look-up table" 
y_cos = zeros(1,N);
phase = 0;


LUT = % Determine a LUT buffer with a proper size

% Fill up the LUT, you may use the same method as the one in function call,
% but with differnt buffer size!



% For each discrete time, call a value from LUT. 
% Avoid the use of mod() operator.
idx = 1
for i=1:N
    
    y_cos(i) = LUT() % store the corresponding cosine value
end




