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: apriori_gen.m
    path of file: ./repos/ml-in-action/chapter15
    
    the code of the file until where you have to start completion: function [C]=apriori_gen(A,k)%发生Ck（实现组内连接及剪枝 ）   
%A表现第k-1次的频仍项集 k表现第k-频仍项集
[m n]=size(A);
C=zeros(0,n);
%组内连接
for i=1:1:m

    
function [C]=apriori_gen(A,k)%发生Ck（实现组内连接及剪枝 ）   
%A表现第k-1次的频仍项集 k表现第k-频仍项集
[m n]=size(A);
C=zeros(0,n);
%组内连接
for i=1:1:m
    for j=i+1:1:m
        flag=1;
        for t=1:1:k-1
            if ~(A(i,t)==A(j,t))
                flag=0;
                break;
            end