Question: In Matlab, how can you code that if a string has any of a certain set of specific words, to replace them with a different

In Matlab, how can you code that if a string has any of a certain set of specific words, to replace them with a different word. For example, the first set of "problem" words, {'Joe' 'coffee' and 'chocolate' } are found from text file 1 and their replacement words are found from text file 2 in the format of the problem word first followed by the replacement (< problemword >: < replacement >). Each text file can have these words multiple times in them throughout the file and they can be on the same line as well. I made a switch case, but I don't know how to actually find where these words are and replace the words with the replacement words after pulling them out of text file 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!