MATLAB Answers

convert a char array into a single char

26 views (last 30 days)
aidan vickars
aidan vickars on 18 Mar 2019
Basically I have a 360*4 char array full of letters, I need to convert it to a 31*40 char array. But the issue is the order matters. In the new array, the 1st row must be the first row of the old array followed by the second row of the old array followed by the third row of the old array and so on up to 40 characters for each row.
Any thoughs would be greatly appreciated.

  1 Comment

KSSV
KSSV on 18 Mar 2019
Read about reshape. Else attach your data.

Sign in to comment.

Answers (1)

Pruthvi Raj Gampalwar
Pruthvi Raj Gampalwar on 18 Mar 2019
Please specify with an example.
You can use
Empty_chars = char(' '*char(ones(360,4)))
Reshaped = reshape(Empty_chars,36,40)
help reshape for mre info

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags

Products


Release

R2018b