Effacer les filtres
Effacer les filtres

How do I convert a 64 bit, two's complement value(binary vector)[ 1 0 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] into a signed integer?

2 vues (au cours des 30 derniers jours)
How do I convert a 64 bit, two's complement value(binary vector)[ 1 0 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] into a signed integer?

Réponse acceptée

Walter Roberson
Walter Roberson le 19 Avr 2018
swapbytes(typecast(uint8(bin2dec(char(reshape(fliplr(A),8,[]).' + '0'))),'int64'))

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by