Question: In one single matlab script file (exercise02.m), implementing the following: 1. Read in the lines of the text file using the fgetl function. Store the

 In one single matlab script file (exercise02.m), implementing the following: 1.

In one single matlab script file (exercise02.m), implementing the following: 1. Read in the lines of the text file using the fgetl function. Store the lines of this file in a cell array. Useful functions: for, fopen, fgetl. 2. Parse your stored lines of text into their constituent words using the strtok function. Store all of the words in the entire document in a cell array with one word per index. 3. Create a lexicon consisting of all of the unique words in all the files. Useful function: unique. 4. Create a column vector representing how many times each lexicon word occurs in the document. This is a word vector representation for the document. Useful function: zeros. In one single matlab script file (exercise02.m), implementing the following: 1. Read in the lines of the text file using the fgetl function. Store the lines of this file in a cell array. Useful functions: for, fopen, fgetl. 2. Parse your stored lines of text into their constituent words using the strtok function. Store all of the words in the entire document in a cell array with one word per index. 3. Create a lexicon consisting of all of the unique words in all the files. Useful function: unique. 4. Create a column vector representing how many times each lexicon word occurs in the document. This is a word vector representation for the document. Useful function: zeros

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!