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: test.m
    path of file: ./repos/Algorithms_MathModels/HeuristicAlgorithm（补分启发式算法，包括神经网络、模拟退火、遗传算法）/神经网络算法/MATLAB神经网络30个案例分析/案例4 神经网络遗传算法函数极值寻优-非线性函数极值
    
    the code of the file until where you have to start completion: function flag=test(lenchrom,bound,code)
% lenchrom   input : 染色体长度
% bound      input : 变量的取值范围
% code       output: 染色体的编码值

x=code; %先解码

    
function flag=test(lenchrom,bound,code)
% lenchrom   input : 染色体长度
% bound      input : 变量的取值范围
% code       output: 染色体的编码值

x=code; %先解码
flag=1;
if (x(1)<bound(1,1))&&(x(2)<bound(2,1))&&(x(1)>bound(1,2))&&(x(2)>bound(2,2))
    flag=0;
end