How to generate random orthogonal codes in matlab

12 ビュー (過去 30 日間)
Ayesha Punjabi
Ayesha Punjabi 2019 年 3 月 14 日
コメント済み: Ayesha Punjabi 2019 年 3 月 14 日
  • currently i am using randi(0:1,5,16)
  • which gives me 1 bit random values of 0 and 1
  • but I want to generate two bits of 0 and 1 which is 00 10 11 00 10 10
  • how should i generate such values.
  • i tried (randi(0:1, 5, 16)+'0') but its giving me 49 48 49 48 values which i am not looking for I want values only with respect to 11 00 01 10 00 11
  • Kindly help
  1 件のコメント
John D'Errico
John D'Errico 2019 年 3 月 14 日
What does this have to do with orthogonality? You did explicitly state orthogonal.
As for the problem of generating numbers like 00, MATLAB does not recognize the differeence between that and 0. You COULD convert them to character of course.
help char
but that would do nothing to generate anything orthogonal. So if you really want help, then you need to explain what you need.

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

採用された回答

Torsten
Torsten 2019 年 3 月 14 日
mat2str(de2bi(randi([0,3],5,16)))
  1 件のコメント
Ayesha Punjabi
Ayesha Punjabi 2019 年 3 月 14 日
thank you so much this was really helpful comment.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by