% function: compute_autocorrelation_cc
%
% arguments:
%
%  float_4* data: (input) a single channel of sampled data
%  float_4* autocor_coeffs: (output) autocorrelation coefficients
%  int_4 num_samples: (input) number of samples in the data stream
%  int_4 lp_order: (input) order of the lp model
%  
% return value: a logical_1 indicating status
%
% this function computes the autocorrelation coefficients of a signal
%
function auto_coeff = autocorrelation(data, order) 

  num_samples = length(data);

  % find each autocorrelation coefficient
  %
  for i = 0:order

    % initialize the coefficient
    %
    auto_coeff(i+1) = 0.0;

    % loop over each sample in the data
    %
    for j = 1:num_samples-i

      auto_coeff(i+1) = auto_coeff(i+1) + data(j) * data(j+i);
    end
  end


