function infeaGen(ds, name_gen)

for d = ds
      
    record.sdprelax = {}; 
    NumCase = 1000;
    if d>6
        NumCase = 100;
    end
    
    fprintf(['d = ' num2str(d) '   ']);
    NumBack=0;
    i = 1;
    while (1)

        [Pts,ColorPartition,b]=feval(name_gen,d);
        filname=['infeasi_cases/infeasi' num2str(d) 'd' num2str(i) '.mat'];
        for c=1:NumBack
            fprintf('\b');
        end
        NumBack = fprintf('i = %d', i);
        while (exist(filname,'file')==2)
            i = i+1;
            for c=1:NumBack
                fprintf('\b');
            end
            NumBack = fprintf('i = %d', i);
            filname=['infeasi_cases/infeasi' num2str(d) 'd' num2str(i) '.mat'];
        end
        save(filname, 'Pts', 'b', 'ColorPartition');
        i = i+1;
        
        if (i>NumCase)
            break;
        end
    end
    
    fprintf('\n');

end
    
end
