Reputation: 24131
Suppose I have a cell array containing strings:
c = {'foo1', 'foo2', 'foo3'}
I now want to add the same suffix "bar
" to each string, such that the cell array becomes:
c = {'foo1bar', 'foo2bar', 'foo3bar'}
Is there a shortcut to doing this, without explicitly looping through each element?
Upvotes: 4
Views: 1556