フィルターのクリア

help with hadamard matrix

2 ビュー (過去 30 日間)
Dija
Dija 2014 年 12 月 3 日
編集済み: Azzi Abdelmalek 2014 年 12 月 3 日
i have Hadamard matrix
N=8;
H=hadamard(N)
>>H =
1 1 1 1 1 1 1 1
1 -1 1 -1 1 -1 1 -1
1 1 -1 -1 1 1 -1 -1
1 -1 -1 1 1 -1 -1 1
1 1 1 1 -1 -1 -1 -1
1 -1 1 -1 -1 1 -1 1
1 1 -1 -1 -1 -1 1 1
1 -1 -1 1 -1 1 1 -1
i want to keep the same values of the first and the last column and the first row and change the others like this
H =
1 1 1 1 1 1 1 1
1 a a -a a -a a -1
1 a -a -a a a -a -1
1 -a -a a a -a -a 1
1 a a a -a -a -a -1
1 -a a -a -a a -a 1
1 a -a -a -a -a a 1
1 -a -a a -a a a -1

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 3 日
編集済み: Azzi Abdelmalek 2014 年 12 月 3 日
H=hadamard(8);
a=10
H(2:end,2:end-1)=a*sign(H(2:end,2:end-1))
%or simply
H(2:end,2:end-1)=a*H(2:end,2:end-1)
  1 件のコメント
Dija
Dija 2014 年 12 月 3 日
Thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by