I have a cell-array C with 7 strings inside C as follows:
C = { 'ABCDF'
'ABF'
'ABCDEFG'
'ABCDEF'
'ABDEFG'
'ABCDEFG'
'ABCEG' }
How can I change the 'AB' in each of the 3 first strings into 'BA'? The remain strings just keep the same as the original. The expected output will be as follows:
C = { 'BACDF'
'BAF'
'BACDEFG'
'ABCDEF'
'ABDEFG'
'ABCDEFG'
'ABCEG' }
strfindmight be useful.