function [ f0 ] = f0_estimate( time_block, fs )
%F0_ESTIMATE Estimate the fundamental frequency of a harmonic signal
%  time_block: time signal block
%  fs:         sampling frequency
%  f0:         estimated fundamental frequency

% put the appropriate tuning settings here
lag_min=1;     %minimum lag for the search  change this
lag_max=100;   %maximum lag for the search. change this

% variables that should be shared between calls:
persistent dummy1;

% part of instruction 2:. calculate the auto correlation
% use the autocorrelation function implemented as step 1 of the
% instructions

% part of instruction 2: find the maximum of the auto correlation
% in the desired range of lags

% part of instruction 4: implement a strategy to avoid octave jumps

% return f0 estimate in Hz
end