Replacing the LSB value
1 次查看(过去 30 天)
显示 更早的评论
I have some values such as
p=0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
p1=1 1 1 1 1
now i want to replace last five bits of p by p1
so output is
p=0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 1
i need to do it by using genetic algorithm plz provide me assistance
0 个评论
回答(1 个)
Jan
2012-11-8
No, this is not a job for a genetic algorithm.
p = [0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0];
p1 = [1 1 1 1 1];
p(end-4:end) = p1;
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!