Question: Words to Sentence ( working with a cell array of character vectors ) My Solution Write a function named sentenceMaker that receives a cell array
Words to Sentence working with a cell array of character vectors
My Solution
Write a function named sentenceMaker that receives a cell array of words character arrays and returns a sentence stored in a single row character vector made up of the words in each cell. For example, if the input cell array is
words Hello ; 'how'; 'are'; 'you'; 'doing?
then the function should return the character array:
sentence 'Hello, how are you doing?
Be sure to insert a space between each word as you concatenate them into the character array containing the sentence.
Note the function command is given in line with suggested names for the input and output variables. You can change the names but not the order of these variables if you like. Do not change the name of the function, however, as this exact name is required for the tests to run. Be sure to assign a value to the output variable.
Function
Save
Ruesied
MATLAB Documentation
Code to call your function
WordsHello;'how';'are';'you';'doing?;
Sentence sentenceMakerworks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
