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: arCreateDataStruct.m
    path of file: ./repos/d2d/arFramework3/Advanced
    
    the code of the file until where you have to start completion: % arCreateDataStruct(m,[pold],[fp],varargin)
% 
% This function can be used to add data structs before compiling, i.e. in
% addition to arLoadData
% 
%   pold    parameters which have to be replaced (like conditions) in order
%           to get data-
    
function can be used to add data structs before compiling, i.e. in
% addition to arLoadData
% 
%   pold    parameters which have to be replaced (like conditions) in order
%           to get data-specific parameters
% 
%   fp      new parameter names
% 
% 
% Example:
% D = arCreateDataStruct(1)
% 
% Example:
% D = arCreateDataStruct(1,{'maxtime'},{'100'});
% arAddDataStruct(D);
% arCompileAll;
% 
% 
% See also arCondition2NewDataStruct, arCondition2NewDataStruct2,
% arCondition2NewDataStruct3, arFitTransientFunction2

function D = arCreateDataStruct(m,pold,fp,varargin)
global ar
if ~exist('pold','var') || isempty(pold)
    pold = cell(0);
elseif ~iscell(pold)
    pold = {pold};% make cell 
end