perhaps a better option is: ## Deblank string 'str' regexprep(str,strcat("[",white_spaces,"]+")," ");
--> if ~isempty(white_spaces) ## Remove multiple white space from string 'str' regexprep(str,strcat("[",white_spaces,"]+")," "); endif eric ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev