function [sim]=generate_hidden_variable(column)
generated=0;
rand_num=rand(1);
if rand_num<=column(1)
    sim=1;
    generated=1;
end
if generated~=1;
    for i=2:length(column)
        if ((sum(column(1:i-1))/(sum(column))<rand_num)&&(rand_num <=sum(column(1:i))/((sum(column)))));
            sim=i; 
        end
    end
end
    
 