What will be the output of of CD(1:8:8*16)=ciphertext

1 回表示 (過去 30 日間)
Jayashree Walimbe
Jayashree Walimbe 2019 年 7 月 15 日
コメント済み: Guillaume 2019 年 7 月 16 日
What is the result of CD(1:8:8*16)=ciphertext ? Not able to interpret this.
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 7 月 15 日
Imagine that CD is an array that is 8 x 16. Then that operation would be the same as storing values to the entire first row.

サインインしてコメントする。

採用された回答

Guillaume
Guillaume 2019 年 7 月 15 日
編集済み: Guillaume 2019 年 7 月 16 日
It simply replaces elements 1,9,17, 25, ..., 121 of CD by the elements of ciphertext. Since that's 16 elements of CD that are replaced, if ciphertext does not have exactly 16 elements, the line is an error.
If CD is an 8x16 matrix, then as Walter commented, this replace the first row of CD. And in that case CD(1, :) = ciphertext would have been clearer.
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 7 月 15 日
It is 16 elements, Guillaume, not 15.
Guillaume
Guillaume 2019 年 7 月 16 日
@Walter. Indeed! I don't know what I was thinking. Fixed now.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by