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: CreateClusteringData.m
    path of file: ./repos/DeepSqueak/Functions/Call Classification
    
    the code of the file until where you have to start completion: function [ClusteringData, clustAssign, freqRange, maxDuration, spectrogramOptions] = CreateClusteringData(handles, varargin)
%% This function prepares data for clustering
% For each file selected, create a cell array with the image, and contour
% of calls where Calls.Accept == 1


    
function [ClusteringData, clustAssign, freqRange, maxDuration, spectrogramOptions] = CreateClusteringData(handles, varargin)
%% This function prepares data for clustering
% For each file selected, create a cell array with the image, and contour
% of calls where Calls.Accept == 1

p = inputParser;
addParameter(p,'forClustering', false);
addParameter(p,'spectrogramOptions', []);
% scale_duration can eithor be logical or scaler. If scalar, scale_duration
% is the duration used at t_max to scale duration by sqrt(t_max ./ t)
% If true, than t_max is the 95th percentile of call durations
addParameter(p,'scale_duration', false);
% If scale_duration is true, use a fixed frequency range for spectrograms
addParameter(p,'fixed_frequency', false);
% fixed_frequency = [lowFreq, highFreq] for fixed frequency range
addParameter(p,'freqRange', []);
% Ask to save the data for future use
addParameter(p,'save_data', false);
addParameter(p,'for_denoise', false);
parse(p,varargin{:});
spectrogramOptions = p.Results.spectrogramOptions;

ClusteringData = {};
clustAssign = [];
maxDuration = [];
freqRange = [];
xFreq = [];
xTime = [];
stats.Power = [];

% Select the files
if p.Results.forClustering
    prompt = 'Select detection file(s) for clustering AND/OR extracted contours';
else
    prompt = 'Select detection file(s) for viewing';
end