Filter löschen
Filter löschen

Help on conversion of data

3 Ansichten (letzte 30 Tage)
Amit Mishra
Amit Mishra am 20 Okt. 2015
Kommentiert: Amit Mishra am 22 Okt. 2015
Please help me on it
  1. if i have 3 column of data
  2. convert the data to binary 4 bit
  3. concat it to one data to make 12 bits
  4. transpose the concated data
  5. and take it as input.
Thanks
  6 Kommentare
Amit Mishra
Amit Mishra am 21 Okt. 2015
e.g. p1 has 3 columns now column 1 will be converted to 4 bit binary column 2 will be converted to 4 bit binary n same to column 3. now i want to concat it so that it will be a 12 bit binary digit.
Amit Mishra
Amit Mishra am 22 Okt. 2015
no response till now. plz sir

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Walter Roberson
Walter Roberson am 21 Okt. 2015
  1 Kommentar
Walter Roberson
Walter Roberson am 21 Okt. 2015
dec2bin( floor(A(:,1) * 16) * 256 + floor(A(:,2) * 16) * 16 + floor(A(:,3) * 16), 12) - '0'

Melden Sie sich an, um zu kommentieren.


Thorsten
Thorsten am 21 Okt. 2015
Bearbeitet: Thorsten am 21 Okt. 2015
With 4 bits you can code 32 numbers, like the integers from 0 to 31. You cannot convert double precision numbers between 0 and 1 to 4 bit without loss. One way to convert would be to multiply by 32 and then use dec2bin.
  6 Kommentare
Amit Mishra
Amit Mishra am 21 Okt. 2015
kindly chk sir
Amit Mishra
Amit Mishra am 22 Okt. 2015
no response till now. plz help me.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by