From: Chris on
I am trying to use:
regexprep(regexprep(str, '(^.)', '${upper($1)}'), ...
'(?<=\ \s*)([a-z])','${upper($1)}');

But I can not use the command "uppers". Are there any ideas?
I have tried:

caps = (str >= 'A')&(str <= 'Z');%indexes the columns w/ capitals
str(caps) = str(caps) +'a'-'A';%turns CAPS to lowercase

but this turns everything to lowercase and when I try using it in place of $uppers I get an error....
From: Jason Breslau on
Is this what you're looking for:

>> str = 'The quick brown fox jumps over the lazy dog';
>> regexprep(str, '(^|\s)\w', '${upper($0)}')

ans =

The Quick Brown Fox Jumps Over The Lazy Dog