Azzera filtri
Azzera filtri

ommiting blanks in code

1 visualizzazione (ultimi 30 giorni)
lowcalorie
lowcalorie il 23 Mag 2012
how do i write a code sequence omitting any trailing and leading blanks

Risposte (1)

Oleg Komarov
Oleg Komarov il 23 Mag 2012
Example:
str = ' some blanks here and there ';
str = strtrim(str)
str =
some blanks here and there
str([1,end])
ans =
se

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by