
function [Chrom, Linc] = popu_init(Ninc, Linc, Prob, Cc)

% Create a structure of random chromosomes in row wise order, dimensions
% Ninc by Linc. 
Chrom = rand(Ninc,Linc);

% Scal the initial population using the initial probability. If a randomly produced value is larger than Prob, the 
% entry is equal to "1". Otherwise, the entry is equal to "0"
for i=1:Ninc
    for j=1:Linc
        if Chrom(i,j) > Prob
            Chrom(i,j) = 1;
        else
            Chrom(i,j) = 0;
        end
    end
    
    if sum(Chrom(i,1:Cc(1))) == 0 && Cc(1) ~= 0
    
        Chrom(i, randint(1,1,[1,Cc(1)])) = 1;
    
    end

    
end

