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: perform_histogram_equalization.m
    path of file: ./repos/gptoolbox/external/toolbox_fast_marching/toolbox
    
    the code of the file until where you have to start completion: function x = perform_histogram_equalization(x,y,options)

% perform_histogram_equalization - perform histogram equalization
%
%   x = perform_histogram_equalization(x,y,options);
%
%   Change the values of x so that its ordered values match
%   the ordered values of y.
%
%   You can set
%       options.cols=1 to operate along columns
%       options.rows=1 to operate along rows
%       options.dim3=1 to operate along 3rd dimension
%       options.absval to operate only on absolute values.
%       options.histinterp in [0,1] to interpolate between the two
%       histograms
%
%   You can also use
%       x = perform_histogram_equalization(x,'gaussian',options);
%       x = perform_histogram_equalization(x,'linear',options);
%   to impose gaussian or uniform density.
%   
%   Copyright (c) 2006 Gabriel Peyre


    
function x = perform_histogram_equalization(x,y,options)

% perform_histogram_equalization - perform histogram equalization
%
%   x = perform_histogram_equalization(x,y,options);
%
%   Change the values of x so that its ordered values match
%   the ordered values of y.
%
%   You can set
%       options.cols=1 to operate along columns
%       options.rows=1 to operate along rows
%       options.dim3=1 to operate along 3rd dimension
%       options.absval to operate only on absolute values.
%       options.histinterp in [0,1] to interpolate between the two
%       histograms
%
%   You can also use
%       x = perform_histogram_equalization(x,'gaussian',options);
%       x = perform_histogram_equalization(x,'linear',options);
%   to impose gaussian or uniform density.
%   
%   Copyright (c) 2006 Gabriel Peyre



options.null = 0;

if iscell(x)
    for i=1:length(x)
        x{i} = perform_histogram_equalization(x{i},y{i},options);
    end