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: test_SolveSVM_random.m
    path of file: ./repos/ForBES/tests
    
    the code of the file until where you have to start completion: close all;
clear;

% solve a small SVM problem via the dual QP using quadprog
% then compare with the solution found with ForBES

n = 2100; % number of features (= number of variables minus one)
m = 130; % number of samples

w = randn(n, 1);  % N(0,1), 30% sparse

A = randn(m, n);
btrue = sign(A*w);

% noise is function of problem size use 0.1 for large problem
b = sign(btrue + sqrt(0.1)*randn(m,1)); % labels with noise
mu = 1.0;

% solve dual problem using QUADPROG
BA = diag(sparse(b))*A;
Q = BA*BA';
q = ones(size(A, 1), 1);
opt_qp = optimopt
    
function of problem size use 0.1 for large problem
b = sign(btrue + sqrt(0.1)*randn(m,1)); % labels with noise
mu = 1.0;

% solve dual problem using QUADPROG
BA = diag(sparse(b))*A;
Q = BA*BA';
q = ones(size(A, 1), 1);
opt_qp = optimoptions('quadprog','Display','off');
[lambda_qp, fval_qp, flag_qp, output_qp] = quadprog(Q, -q, [], [], [], [], zeros(m, 1), mu*ones(m, 1), [], opt_qp);
x_qp = BA'*lambda_qp;

f = quadLoss();
g = hingeLoss(mu, b);
constr = {A, -1, zeros(m, 1)};
y0 = zeros(m, 1);

TOL = 1e-8;
ASSERT_TOLX = 1e-4;
ASSERT_TOLF = 1e-6;

%% adaptive

baseopt.display = 0;
baseopt.adaptive = 1;
baseopt.maxit = 10000;
baseopt.tol = TOL;

opts = {};
outs = {};

opts{end