how can i generate this chromosome?
显示 更早的评论
how can i generate this chromosome? I tried to generate randomly this chromosome [2 2 3 1 2 3 1 1 3]. this chromosome represents that I have 3 jobs and each job has 3 tasks. I need this chromosome to use genetic algorithm.
采纳的回答
更多回答(1 个)
sejo
2014-9-9
hy, try this:
chrom=randi([1,3],1,9)
2 个评论
ghazwan alsoufi
2014-9-9
isuru senevirathne
2018-5-24
chrom=randi([1,10],1,9)
you can not make to repeat each number in three times , becuse it is randomly generate
类别
在 帮助中心 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!