Question: Using MatLab: Write a function named cellProcess that takes in a cell array with each being either a string (character array), or a vector(containing numbers).

Using MatLab:

Write a function named cellProcess that takes in a cell array with each being either a string (character array), or a vector(containing numbers). Your function should return the following:

nStr: the number of strings

nVec: the number of vectors

nBool: the number of boolean values

cString: a cell array of all the strings in alphabetical order

vecLength: the average length of all the vectors

allTrue: true if all the boolean values are true and false otherwise

For example: [a b c d e f]=cellProcess({[1, 2, 3], true. hi, there!, 42, false, abc}) should return a=2, b=2, c=2, d={abc, hi, there}, e=2 and f=false.

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!