Modifying MATLAB code according to conditions (MATLAB)

1 回表示 (過去 30 日間)
high speed
high speed 2022 年 8 月 30 日
編集済み: high speed 2022 年 9 月 1 日
Dear,
I have this code
A = sum(matrix(decode == 1, :), 1);
B = max(A);
C = find( A == B );
D = mod(code(C)+1,2);
I want to modify this code, in such a way it flips only the first bit not all the bits
For example we have a sequence code where the bits are (2nd, 4th , 7th and 9th bits)
In this case I want to flip only the 2nd bits.

採用された回答

Voss
Voss 2022 年 8 月 31 日
B = max(A);
C = find( A == B , 1 );
Or
[B,C] = max(A);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by