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: clfDecTreeTrain.m
    path of file: ./repos/toolbox/external/deprecated
    
    the code of the file until where you have to start completion: function clf = clfDecTreeTrain( clf, X, Y )
% Train a decision tree classifier.
%
% USAGE
%  clf = clfDecTreeTrain( clf, X, Y )
%
% INPUTS

    
function clf = clfDecTreeTrain( clf, X, Y )
% Train a decision tree classifier.
%
% USAGE
%  clf = clfDecTreeTrain( clf, X, Y )
%
% INPUTS
%  clf     - model to be trained
%  X       - nxp data array
%  Y       - nx1 array of labels
%
% OUTPUTS
%  clf     - a trained binary decision tree clf
%
% EXAMPLE
%
% See also CLFDECTREE
%
% Piotr's Image&Video Toolbox      Version 2.0
% Copyright 2008 Piotr Dollar.  [pdollar-at-caltech.edu]
% Please email me if you find bugs, or have suggestions or questions!
% Licensed under the Lesser GPL [see external/lgpl.txt]

if(~strcmp(clf.type,'dectree')); error( ['incor. type: ' clf.type] ); end