Question: How to write a matlab function that can extract uppercase, lowercase, numbers and special cases like NaN,Inf from a cell array Write a function with

How to write a matlab function that can extract uppercase, lowercase, numbers and special cases like NaN,Inf from a cell array  How to write a matlab function that can extract uppercase, lowercase,

Write a function with the following header: function [upper case, lower case, numbers, speciall my cell extractor(array) where array is a 1-n cell array. Each element of array is either A non-empty row vector of class double A non-empty row vector of class char (i.e. a non-empty character string). A non-empty cell array that follows the same format as array. upper case is a non-empty row vector of class char that contains all the upper case characters found in the elements of the input parameter array, in the order in which they appear in array. lower case is a non-empty row vector of class char that contains all the lower case characters found in the elements of the input parameter array, in the order in which they appear in array. numbers is a non-empty row vector of class double that contains all the elements of class double (except for NaN nf, and Inf found in the elements of the input parameter array, in the order in which they appear in array. special is a non-empty row vector of class double that contains all the elements of class double among NaN, nf, and Inf, that are found in the elements of the input parameter array, in the order in which they appear in array. Treat lower case letters from a to z as lower case characters, and any other character as upper case. You can assume that you will ndin array: At least one lower case character and At least one upper case character; and At least one element of class double that is not NaN, -Inf, or Inf and At least one element of class double that is one of NaN, -nf, and Inf In other words, none of your function's outputs should be an empty array Hints You may want to consider using recursion for this question If the variable Ac" is a 1-1 array of class char i e. a character string that contains only one character, you can check whether this character qual es as upper case for this question by using the logical expression c upper(c). This logical expression will evaluate to true (logical 1) if the character should be considered upper case, and false (logical o) otherwise. Test cases: [u n, sl my cell extractor (4, NaN, 6, o, a',-1, B an 460-1 NaN

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!