Transforming 100x4 Char Array to 1x400 Char Array

3 views (last 30 days)
Hello,
I have a char array with the dimensions of 100x4 and because it contains blank elements, in other words 4 charactered space ' ', I want to merge these elements and delete these 4 charactered blank elements. How can I do it? Thank you.
  2 Comments
tinkyminky93
tinkyminky93 on 7 Jun 2022
Edited: tinkyminky93 on 7 Jun 2022
That is what I want sir, i will remove them because it does not contains any information.

Sign in to comment.

Accepted Answer

KSSV
KSSV on 7 Jun 2022
You have varities of functions to achieve this.
Try:
str = str(find(~isspace(str))) ; % where str is your string
  5 Comments
KSSV
KSSV on 7 Jun 2022
@tinkyminky93 why don't you attch your data, so that we can have a look and help you.

Sign in to comment.

More Answers (0)

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by