function [fClusterDeg] = calc_ClusterDeg(mCatalog, vCluster)
    % determine degree of clustering
    %
    % [fClusterDeg] = calc_ClusterDeg(mCatalog, vCluster);
    %---------------------------------------------------
    % determine degree of clustering
    %
    % Incoming variables
    % mCatalog : EQ catalog in ZMAP format
    % vCluster : Vector of cluster numbers
    %
    % Outgiong variables:
    % fClusterDeg : Percentage of clustering
    %
    % J. Woessner, woessner@seismo.ifg.ethz.ch
    % updated: 19.08.02
    
    
    report_this_filefun();
    
    vSel = (vCluster(:,1) > 0);
    mCatalogDecl = mCatalog.subset(vSel);
    if isempty(mCatalogDecl) % This means no events in cluster!
        fClusterDeg = NaN;
    else
        fClusterDeg = length(mCatalogDecl(:,1))/mCatalog.Count;
    end
end
CelsoReyes
github-repos/MATLAB/CelsoReyes-zmap7/zmap7-3895fcb3ca3073608abe22ca71960eb082fd0d9a/src/jochen/seisvar/calc/calc_ClusterDeg.m
zmap7
github-repos/MATLAB/CelsoReyes-zmap7
3895fcb3ca3073608abe22ca71960eb082fd0d9a