I have a string with a bunch of words separated by commas
S='Apples,Oranges,January,February,…'
I get a vector with the placement of all the commas with
commas=strfind(s,',');
how do i place a character before every comma in the string, so it will come out like
Snew='Apples2,Oranges2,January2,February2,…'
Best Answer