Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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 回表示 (過去 30 日間)
Huma Jabeen
Huma Jabeen 2018 年 2 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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!

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by