Effacer les filtres
Effacer les filtres

Modifying MATLAB code according to conditions (MATLAB)

1 vue (au cours des 30 derniers jours)
high speed
high speed le 30 Août 2022
Modifié(e) : high speed le 1 Sep 2022
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.

Réponse acceptée

Voss
Voss le 31 Août 2022
B = max(A);
C = find( A == B , 1 );
Or
[B,C] = max(A);

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by