www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RemoveLeadingAndTrailingWhitespaceCharactersExample.m
%% Remove Leading and Trailing Whitespace from Cell Array % Remove the leading and trailing whitespace from all the character vectors % in a cell array and display them. chr = {' Trim leading whitespace'; 'Trim trailing whitespace '} %% newChr = strtrim(chr)