Question: Matlab code Function Name: palingrove Inputs: 1. (cel) An MxN cell array containing information about a grove of trees Outputs: 1. (cell) A PxN new

Matlab code  Matlab code Function Name: palingrove Inputs: 1. (cel) An MxN cell

Function Name: palingrove Inputs: 1. (cel) An MxN cell array containing information about a grove of trees Outputs: 1. (cell) A PxN new cell array containing only the rows that are palindromes Background You need to fulfil your final social science requirement before getting out, so you enrol in HTS 2803, History of Trees. You thought the class would be boring, but you find yourself inspired while reading about the nineteenth century pioneer John Chapman (better known as Johnny Appleseed). You decide to plant your very own orchard, containing not just apple trees but a wide variety of topiary. Function Description: A palindrome is a word, phrase, or sequence that reads the same backward as forward (e.g., "racecar) To add symmetry to your orchard, you decide that every row in the grove should be a palindrome Write a function that takes in a cell array outining the plan for your new orchard and removes any rows in the array that are not palindromes. Example >> Orchard {'Fig., Walnut Cherry .Apple',' Fig. Maple,Orange 'Palm, "Cherry = >> neworchard palingrove(orchard) neworchard ('Fig, 'Apple Fig Cherry', Palm, Cherry') Notes . You must use recursion to determine if a particular row is a palindrome The number of columns may be even or odd Palindromes are case insensitive

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!