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: cpgc_significance_func.m
    path of file: ./repos/malini/Codes/FC_EC_calculation code/StaticEC(CPGC)
    
    the code of the file until where you have to start completion: 
function [conmat,p_thresh,p_val]=cpgc_significance_func(data,ord)

    
function [conmat,p_thresh,p_val]=cpgc_significance_func(data,ord)

% data is a matrix which has all the time series stacked into it as columns
% ord is model order

for i=1:size(data,2)
        for j=1:size(data,2)
            if i~=j
                conmat(i,j)=CPGC_cap_func(data(:,i),data(:,j),ord);
            else
                conmat(i,j)=0;
            end