Question: Homework 13 - Recursion Function Name: unnest nputs: 1. (cell) 1xN cell array Outputs: 1. (cell) 1xM cell array, with no nested cells Function Description:

 Homework 13 - Recursion Function Name: unnest nputs: 1. (cell) 1xN

Homework 13 - Recursion Function Name: unnest nputs: 1. (cell) 1xN cell array Outputs: 1. (cell) 1xM cell array, with no nested cells Function Description: the cells and bring all of the non-cell values to the top layer (wrapped in only the outer cell Given a cell array containing nested elements, use recursion to go through the levels of array). Any cell can contain a 1xP vector of values (of any data type). Example: ca (3, true, f'ab', ([1, 2, 3, 4]1x2 cell array) outunnest (ca) out -3, true, 'a', 'b', 1, 2, 3, 4 ) (1x7 cell array) Notes: For a cell containing a vector of non-cell values, each scalar value of the vector should have its own cell in the output cell array. You must use recursion to solve this problem. Hints: The num2cel1() function works on arrays of doubles, chars, and logicals

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!