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: cubic_cubic_intersect.m
    path of file: ./repos/gptoolbox/mesh
    
    the code of the file until where you have to start completion: function [T] = cubic_cubic_intersect(CA,CB,tol)
  % CUBIC_CUBIC_INTERSECT Intersect two cubic Bezier curves.
  % 
  % [T] = cubic_cubic_intersect(CA,CB,tol)
  %

    
function [T] = cubic_cubic_intersect(CA,CB,tol)
  % CUBIC_CUBIC_INTERSECT Intersect two cubic Bezier curves.
  % 
  % [T] = cubic_cubic_intersect(CA,CB,tol)
  %
  % Inputs:
  %   CA  #4 by 2 list of control point locations
  %   CB  #4 by 2 list of control point locations
  % Outputs:
  %   T  #T by 2 list of parameters between [0,1] of intersects, so that
  %     intersect i occurs at T(i,1) on curve A and at T(i,2) on curve B.
  %
  % See also: cubic_eval, cubic_is_flat, cubic_split
  %

  if nargin<3
    tol = 1e-7;
  end