ommiting blanks in code

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

답변 (1개)

Oleg Komarov
Oleg Komarov 2012년 5월 23일

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