convert 128x2 char to 1x64 char

How can I convert 128x2 char to 1x64 char

3 Comments

Can you give an example of what type of conversion you are trying to do?
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
Output should be in this form:1x64 char
'669D5EA967E54A8423F43553E3F287D7EBDEABE7F6A15BDFD6A7AA869037DACB'

Sign in to comment.

 Accepted Answer

If val is your char array..you can try something like:
iwant = strcat(val(1:2:end),val(2:2:end))

2 Comments

I modified it like this and it worked. Thanks
iwant = strcat(val(1:2:64),val(2:2:64));
Yes...you can, if you want to join the first half and second half.

Sign in to comment.

More Answers (0)

Categories

Asked:

on 26 Sep 2020

Commented:

on 26 Sep 2020

Community Treasure Hunt

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

Start Hunting!