I want to change a variable by probability value,
as a example I have [ 0 0 1 1 1 1 0 1 ] in matlab and with probability = 0.01 change any elemet of it , how can I achive this in matlab?
(I want use this in GA and with p =0.01 do mutation of Gen of choromosome )
appreciate any help
I want to change a variable by probability value, as a example I have
Share
First, identify all the elements you want to change
Then, you can flip zeros and ones where needed