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: vl_demo_kdtree_forest.m
    path of file: ./repos/2015_Face_Detection/vlfeat/toolbox/demo
    
    the code of the file until where you have to start completion: function vl_demo_kdtree_forest
% VL_DEMO_KDTREE
%   Demonstrates the construction of a forest of randomized
%   kd-trees.

% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).

  % numer of trees in the forest
  numTrees = 4 ;

  randn('state',0) ;
  rand('state',0) ;

  % 2D data X and a query point

    
function vl_demo_kdtree_forest
% VL_DEMO_KDTREE
%   Demonstrates the construction of a forest of randomized
%   kd-trees.

% Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
% All rights reserved.
%
% This file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).

  % numer of trees in the forest
  numTrees = 4 ;

  randn('state',0) ;
  rand('state',0) ;

  % 2D data X and a query point
  Q = single(rand(2,1)) ;
  X = single(rand(2, 100)) ;

  % build  the forest
  kdforest = vl_kdtreebuild (X,  ...
                             'verbose', ...
                             'numtrees', numTrees) ;

  % plot each tree of the forest
  for t=1:numTrees
    figure(t) ; clf ;
    vl_plotframe(X, 'ro') ;
    hold on ;
    xl = [0, +1] ;
    yl = [0, +1] ;
    xlim(xl) ;
    ylim(yl) ;
    axis square ;
    h = vl_demo_kdtree_plot(kdforest.trees(t), 1, xl, yl) ;
    title(sprintf('Tree number %d', t)) ;
    set(gca,'xtick',[],'ytick',[]) ;
    vl_demo_print(t,sprintf('kdtree_forest_tree_%d', t)) ;
  end