フィルターのクリア

Assigning letters to numbers

1 回表示 (過去 30 日間)
Martin
Martin 2023 年 12 月 7 日
コメント済み: Voss 2023 年 12 月 7 日
Hi, I have a simple question. I'm trying to do a Hill Cipher decryption as a project, and I wanted to add "space" as 0, and start A as 1, all the way through Z as 26, so that the cipher will be done with mod27 instead. I could get my alphabets
alphabets = 'A':'Z';
Map(alphabets) = 1:length(alphabets);
But I would like to start from "space" as 0.

採用された回答

Voss
Voss 2023 年 12 月 7 日
alphabets = [' ', 'A':'Z'];
Map(alphabets) = 0:numel(alphabets)-1;
  2 件のコメント
Martin
Martin 2023 年 12 月 7 日
Thank you!!
Voss
Voss 2023 年 12 月 7 日
You're welcome!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by