remove whitespace from cell array
Ältere Kommentare anzeigen
I have a cell array which looks something like this;
'DS 5376'
'FR 8241'
'B 1257'
'BG 09857'
'TR 3017'
I want to remove the central white space (or any white space to that matter) to get the following
'DS5376'
'FR8241'
'B1257'
'BG09857'
'TR3017'
Previous questions and suggested and I have tried using
cell_Array=strrep(cell_Array,' ','')
but to no avail - any ideas as to how I can acheive this?
Many thanks
Akzeptierte Antwort
Weitere Antworten (1)
Lev Vitkin
am 17 Jan. 2024
0 Stimmen
flight_no = cellfun(@(s) s(~isspace(s)), flight_no, 'UniformOutput', false)
Kategorien
Mehr zu Cell Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!