You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: computeStatistics.m
    path of file: ./repos/Image-Harmonization-Dataset-iHarmony4/Lalonde and Efros/colorStatistics/mycode
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [hist1stOrder, hist2ndOrder] = computeStatistics(img, nbBins1stOrder, nbBins2ndOrder, mins, maxs)
%  Computes the first- and second-order statistics of an image (the color space doesn't matter)
% 
% Input parameters:
%   - img: input image
%   - nbBins1stOrder: number of bins for the 1st-order histogram
%   - nbBins2ndOrder: number of bins for the 2nd-order histogram
%   - mins: minimum (for each dimension) to use for the histogram
%   - maxs: maximum (for each dimension) to use for the histogram
%
% Output parameters:
%   - hist1stOrder: 1st-order histogram (nbBins1stOrder^3)
%   - hist2ndOrder: 2nd-order histogram (nbBins2ndOrder^6)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [hist1stOrder, hist2ndOrder] = computeStatistics(img, nbBins1stOrder, nbBins2ndOrder, mins, maxs) 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
function [hist1stOrder, hist2ndOrder] = computeStatistics(img, nbBins1stOrder, nbBins2ndOrder, mins, maxs)
%  Computes the first- and second-order statistics of an image (the color space doesn't matter)
% 
% Input parameters:
%   - img: input image
%   - nbBins1stOrder: number of bins for the 1st-order histogram
%   - nbBins2ndOrder: number of bins for the 2nd-order histogram
%   - mins: minimum (for each dimension) to use for the histogram
%   - maxs: maximum (for each dimension) to use for the histogram
%
% Output parameters:
%   - hist1stOrder: 1st-order histogram (nbBins1stOrder^3)
%   - hist2ndOrder: 2nd-order histogram (nbBins2ndOrder^6)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [hist1stOrder, hist2ndOrder] = computeStatistics(img, nbBins1stOrder, nbBins2ndOrder, mins, maxs) 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2006-2007 Jean-Francois Lalonde
% Carnegie Mellon University
% Do not distribute
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

addpath ../histogram;

%% Make sure the input image has only 2 dimensions
if ndims(img) ~= 2
    img = reshape(img, size(img,1)*size(img,2), size(img,3));
end