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: boundnetf.m
    path of file: ./repos/Algorithms_MathModels/GraphTheory(图论)/detailed/网络流
    
    the code of the file until where you have to start completion: function [f] = boundnetf(G1,G2)
% 容量有上下界的可行流
% G1表示弧的容量下界矩阵
% G2表示弧的容量下界矩阵

    
function [f] = boundnetf(G1,G2)
% 容量有上下界的可行流
% G1表示弧的容量下界矩阵
% G2表示弧的容量下界矩阵
% f用来判断原图中是否存在可行流

n = size(G2,1);
G = G2 - G1;
% G(G~=0)=1;
x = zeros(1,n);
W = [0 x 0;
    x' G x';
    0 x 0;
    ];
for i = 1:n
    W(i+1,n+2)=sum(G1(i,:));
    W(1,i+1)=sum(G1(:,i));
end