From: forkandwait w on 27 Mar 2010 18:12 Is there a quick way to recode a cell array of strings, preferably using a 2xN cell array of pattern/ code pairs? For example: a = {'aa', 'ab', 'cc', 'aa'} recode (a, {'a.*', 'A'; 'c.*', 'C'}) => {'A', 'A', 'C', 'A'} Maybe there is a nice way to do this with cellfun, but there might be an idiom or function special made that I don't know about.
|
Pages: 1 Prev: eigen value in finite field Next: recode strings en masse |