how to remove spaces in a string?

261 views (last 30 days)
I would like to remove the white spaces in every string of this vector “Ly R4” “Ba R7” “Ty Ru”

Accepted Answer

Stephan
Stephan on 12 May 2021
A = ["Ly R4", "Ba R7", "Ty Ru"]
A = 1×3 string array
"Ly R4" "Ba R7" "Ty Ru"
B = erase(A," ")
B = 1×3 string array
"LyR4" "BaR7" "TyRu"

More Answers (0)

Categories

Find more on Characters and Strings 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!