Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Hi all, i'm new to matlab and really need help. I've a binary message and three row vectors, red, green and blue. I want to replace 2 bits of each row vector by the binary message till the message ends. I'm unable to move through the message.

1 Ansicht (letzte 30 Tage)
Here is the part of my code.
msg='Hello';
Ascii = reshape(dec2bin(msg, 8)', 1, []) - '0';
for i=1:length(Ascii)
for x=(i):(i+1)
redLsbVector(x)=Ascii(x);
end
for x=(i):(i+1)
greenLsbVector(x)=Ascii(x+2);
end
for x=(i):(i+1)
blueLsbVector(x)=Ascii(x+4);
end
end
Also please help when to come out of the loop. Thanks in advance!

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by