Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have to do this in Matlab.... Function Name: blackOut Inputs: 1. ( char ) A st

ID: 643647 • Letter: I

Question

I have to do this in Matlab....

Function Name: blackOut

Inputs:

1. (char) A string identifying the name of a text file

2. (cell) A list of words to be removed from the document

Outputs:

(none)

File Outputs:

1. A text file with asterisks in place of the blacklisted words occurring in the text file

Function Description:

Congratulations! You have just been hired by a new, super-secret organization for your superior MATLAB skills. This organization needs you to go in and censor their documents. The company will give you the name of a file and a list of words to be censored. Find these words in the file, ignoring the case of the words as they appear in the file, and replace them with a string of asterisks that are the same length as the word, maintaining the location of spaces in the altered string.

For example, if

Explanation / Answer

c=input('Enter File name');

word=input('Enter a word to be replaced");

replaceinfile(word,'*',c,'text_CENSORED.txt') ;