Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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 visualizzazione (ultimi 30 giorni)
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!

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by