How to read a hexadecimal numbers and flip

7 次查看(过去 30 天)
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

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by