Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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 vue (au cours des 30 derniers jours)
Huma Jabeen
Huma Jabeen le 13 Fév 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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!

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by