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: multiSolveOpti.m
    path of file: ./repos/OPTI/@opti
    
    the code of the file until where you have to start completion: function [x,fval,exitflag,info] = multiSolveOpti(optObj,user_x0,ndivs,penalty,solveAll)
%MULTISOLVESOPTI an OPTI object
%
%   Called By opti multisolve

%   Very basic and naive implementation of a multi-start solver, using
%   pretty much an exhaustive search. However it has been very useful on
%   problems where an initial guess is hard to find!

%   Copyright (C) 2013 Jonathan Currie (Control Engineering)

%Number of 'best points' to keep during search
nbestpts = 10;
%Number of points to use for phase 2
nphase2pts = ceil(nbestpts/2);
%Number of divisions for phase 2 gri
    
function [x_best,fval_best,ef_best,info_best,i_best,where,titer,tfeval] = solvePoint(Opt,lb,ub,x0,verb,i,total_pts,titer,tfeval,x_best,fval_best,ef_best,info_best,i_best,where,phase)       
%Save new bounds into OPTI object
Opt.prob.lb = lb; Opt.prob.ub = ub;
Opt.nlprob.lb = lb; Opt.nlprob.ub = ub;
Opt.nlprob.options.lb = lb; Opt.nlprob.options.ub = ub;
bstr = 1;
%Solve Problem
try
    %Solve Problem
    [xi,fi,ei,ii] = solveOpti(Opt,x0); 
    %Save results into object
    Opt.sol = xi; Opt.obj = fi; Opt.ef = ei; Opt.info = ii;
    %If best, save it
    if(fi < fval_best)
        %Check point is actually feasible
        if(checkOptiSol(Opt,1e-4)) %slightly relaxed tol
            x_best = xi; fval_best = fi; ef_best = ei; info_best = ii; i_best = i; bstr = 2; where = phase;
        end