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: RFT_clusters.m
    path of file: ./repos/VBA-toolbox/modules/random_field_theory
    
    the code of the file until where you have to start completion: function [clusters,imax] = RFT_clusters(X,xc,verbose)
% identifies the clusters on a thresholded RF defined on a regular lattice
% [out] = RFT_clusters(X,xc,verbose)
% This function finds the connected clusters of points Pi on a regular
% lattice, such that their value X(Pi) exceeds the threshold xc.

    
function [clusters,imax] = RFT_clusters(X,xc,verbose)
% identifies the clusters on a thresholded RF defined on a regular lattice
% [out] = RFT_clusters(X,xc,verbose)
% This function finds the connected clusters of points Pi on a regular
% lattice, such that their value X(Pi) exceeds the threshold xc.
% IN:
%   - X: the nX1 vector or discretized RF on the regular lattice
%   - xc: the cluster-inducing threshold
%   - verbose: verbose flag
% OUT:
%   - clusters: a ncX1 cell array containing the indices of the lattice
%   vertices belonging to each cluster, where nc is the number of connected
%   clusters induced by xc.
%   - imax: a ncX1 array of indices of clusters' maxima


try,verbose;catch,verbose=0;end