Question: MATLAB Write a script that creates a cell array of strings, each which is a two-word phrase. The script is to write the first word

MATLAB

Write a script that creates a cell array of strings, each which is a two-word phrase. The script is to write the first word of each phrase to a file "examstrings.dat" in the format shown below. You do not have to error-check on the file open or file close . The script should be general and should work for any cell array containing two-word phrases.

Example cell array:

 {'hi there', 'hello all', 'I did'} 

Example output in file:

 Word 1: hi Word 2: hello Word 3: I 

% create cell array of strings with each cell containing a two-word phrase.

strca =

% write the first word of each phrase to a new line using the format in the problem description

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!