Hide bits in random numbers and extract it
1 次查看(过去 30 天)
显示 更早的评论
How can I generate random binary digits and then hide some of defined binaries it random binaries, and then extract it?
3 个评论
Walter Roberson
2015-11-10
First you tame a hippopotamus, for the practice in "doing difficult things" before you get to "generate random binary digits". Unless you have a Lava Lamp on hand?
回答(1 个)
Walter Roberson
2015-11-11
randomdigits = randint(1,100, [0 1]);
msg='11001100';
outputdigits = randomdigits;
outputdigits(1:length(msg)) = msg - '0';
Now outputdigits has the message hidden in it.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!