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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started