Modifying MATLAB code according to conditions (MATLAB)

조회 수: 2 (최근 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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by