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: setupvars.m
    path of file: ./repos/bads/private
    
    the code of the file until where you have to start completion: function [u0,LB,UB,PLB,PUB,MeshSizeInteger,optimState] = setupvars(x0,LB,UB,PLB,PUB,optimState,nonbcon,options,prnt)
%SETUPVARS Initialize variables and transform coordinates.

nvars = numel(x0);

% Test bound order
if ~all(LB <= PLB & PLB < PUB & PUB <= UB)
    error('Bound vectors do not resp
    
function evaluations
if ~isempty(options.FunValues)
    if ~isfield(options.FunValues,'X') || ~isfield(options.FunValues,'Y')
        error('bads:funValues', ...
            'The ''FunValues'' field in OPTIONS needs to have a X and a Y field (respectively, inputs and their function values).');
    end
        
    X = options.FunValues.X;
    Y = options.FunValues.Y;
    if size(X,1) ~= size(Y,1)
        error('X and Y arrays in the OPTIONS.FunValues need to have the same number of rows (each row is a tested point).');        
    end