ommiting blanks in code

how do i write a code sequence omitting any trailing and leading blanks

回答(1 个)

Example:
str = ' some blanks here and there ';
str = strtrim(str)
str =
some blanks here and there
str([1,end])
ans =
se

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

标签

提问:

2012-5-23

Community Treasure Hunt

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

Start Hunting!

Translated by