convert 128x2 char to 1x64 char

3 views (last 30 days)
sami ullah
sami ullah on 26 Sep 2020
Commented: KSSV on 26 Sep 2020
How can I convert 128x2 char to 1x64 char
  3 Comments
sami ullah
sami ullah on 26 Sep 2020
I have the following 128x2 char. I want to convert it to 1x64 char.
val =
66
9D
5E
A9
67
E5
4A
84
23
F4
35
53
E3
F2
87
D7
EB
DE
AB
E7
F6
A1
5B
DF
D6
A7
AA
86
90
37
DA
CB
E8
E4
0B
CA
5A
7F
F7
93
E6
C7
CE
F5
59
51
EA
C4
36
A8
26
92
F3
D9
F0
09
46
80
06
D4
52
A3
C9
63
2B
D5
45
76
8A
75
05
C8
27
85
9E
82
8E
2A
4B
C6
E1
7C
33
48
A2
94
8B
DB
58
07
9F
C5
50
0A
8C
47
A4
17
CF
8D
E9
62
77
57
5F
7D
8F
61
91
F1
69
15
7A
A5
68
0C
11
FB
CD
55
56
96
6E
95
1A
AF
F9
9A
sami ullah
sami ullah on 26 Sep 2020
Output should be in this form:1x64 char
'669D5EA967E54A8423F43553E3F287D7EBDEABE7F6A15BDFD6A7AA869037DACB'

Sign in to comment.

Accepted Answer

KSSV
KSSV on 26 Sep 2020
If val is your char array..you can try something like:
iwant = strcat(val(1:2:end),val(2:2:end))
  2 Comments
sami ullah
sami ullah on 26 Sep 2020
I modified it like this and it worked. Thanks
iwant = strcat(val(1:2:64),val(2:2:64));
KSSV
KSSV on 26 Sep 2020
Yes...you can, if you want to join the first half and second half.

Sign in to comment.

More Answers (0)

Categories

Find more on Cell Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!