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: intprog.m
    path of file: ./repos/opt_matlab/第6章/例6.2
    
    the code of the file until where you have to start completion: function [x,val,stats]=intprog(f,A,b,I,Aeq,Beq,lb,ub)  %整数规划或混合整数规划
%I为整数约束（即整数约束的变量序号）
if nargin<8
    ub=[];
    if nargin<7
       lb=[];
       if nargin<6

    
function [x,val,stats]=intprog(f,A,b,I,Aeq,Beq,lb,ub)  %整数规划或混合整数规划
%I为整数约束（即整数约束的变量序号）
if nargin<8
    ub=[];
    if nargin<7
       lb=[];
       if nargin<6
           Beq=[];
           if nargin<5
               Aeq=[];
               if nargin<4
                   I=1:length(f);
               end