How to read a hexadecimal numbers and flip

6 views (last 30 days)
yin chen
yin chen on 29 Jul 2020
Answered: KSSV on 29 Jul 2020
I have a txt which is like
00 00 00 02 78 0B 09 00 DA 7F
00 00 00 02 78 0B 08 00 DB 7F
...
I am trying to flip like this
7F DA 00 09 0B 78 02 00 00 00
7F DB 08 0B 78 02 00 00 00 00
If I use fliplr directly which like this
F7 AD 00 90 B0 87 20 00 00 00
that is not what I want
Can anyone give me some hint or help?
THX

Answers (1)

KSSV
KSSV on 29 Jul 2020
str = "00 00 00 02 78 0B 09 00 DA 7F" ;
str = fliplr(strsplit(str)) ;
iwant = strjoin(str) ;

Products

Community Treasure Hunt

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

Start Hunting!