How can I move text into a string, each index containing one character?

1 回表示 (過去 30 日間)
Joseph Kuhn
Joseph Kuhn 2018 年 9 月 18 日
回答済み: Prakhar Jain 2018 年 9 月 25 日
I am working on LSB Steganography. I converted my text message into bits, but I'm not sure how I can move that into an array with each index containing only one of the bits each (such as [1, 0, 0, 1, 0, etc.]) so that I can loop through it and check each index with another value. If this isn't feasible, is there a way that I can put all of the bits into a string and then loop through the string one character at a time?

回答 (1 件)

Prakhar Jain
Prakhar Jain 2018 年 9 月 25 日
converted_text_msg_in_bits = '1001'; % Change this with your bit sequence
array_output_indexwise = converted_text_msg_in_bits - '0'; % This is your required array of bits

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by