From: Chris on 10 Feb 2010 17:30 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 12 Feb 2010 21:55 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
|
Pages: 1 Prev: mex fortran compiler Next: read numbers from strings into new matrix |