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: eval_exact_Specter.m
    path of file: ./repos/scGEAToolbox/+run/external/mt_Specter
    
    the code of the file until where you have to start completion: % Author: Van Hoan Do
function cls = eval_exact_Specter(fea, n_clusters, ensemble_size, mingamma)
% Input:
% -fea: expression data where rows are cells, collumns are principal components computed by PCA or genes
% -n_clusters: number of clusters
% -ensemble_size: number of clusterings in the ensemble
% -mingamma: minimum gaussion bandwidth (default: 0.1)
% Output:
% cls: clusters of cells.

% matlab seed
% rand ("state", 1000000);
% rand('seed', 1089);
rng(1089);
[m, ~] = size(fea);
% apply pre-processing
params.mode = 0;
params.HV = 1; % use highly variable genes selection: 1: yes, 0: no
params.PCA = 1; % apply PCA: 1: yes, 0: no
params.print
    
function cls = eval_exact_Specter(fea, n_clusters, ensemble_size, mingamma)
% Input:
% -fea: expression data where rows are cells, collumns are principal components computed by PCA or genes
% -n_clusters: number of clusters
% -ensemble_size: number of clusterings in the ensemble
% -mingamma: minimum gaussion bandwidth (default: 0.1)
% Output:
% cls: clusters of cells.

% matlab seed
% rand ("state", 1000000);
% rand('seed', 1089);
rng(1089);
[m, ~] = size(fea);
% apply pre-processing
params.mode = 0;
params.HV = 1; % use highly variable genes selection: 1: yes, 0: no
params.PCA = 1; % apply PCA: 1: yes, 0: no
params.print = 1; % print results
params.n_clusters = n_clusters;
[opts, fea] = learn_LSC(fea, params);
opts.seed = 0;

N = ensemble_size;

clusters = zeros(N, m);
optsVec = repmat(opts, N);
for i = 1:1:N
    optsVec(i).r = max(5, round(opts.r*(rand * 0.5 + 0.8)));
    optsVec(i).seed = 10 * i; % use different seed to avoid repetive clustering.
    clusters(i, :) = LSC_eigen(fea, n_clusters, optsVec(i), rand*0.1+mingamma);
end