Question: Please solve using MATLAB and ITERATION(loops). DO NOT HARDCODE!!!! CODE NEED TO WORK FOR ANY INPUT!!!! Function Name: holyCannoli Inputs: 1. (char) MxN map of

Please solve using MATLAB and ITERATION(loops). DO NOT HARDCODE!!!! CODE NEED TOWORK FOR ANY INPUT!!!! Function Name: holyCannoli Inputs: 1. (char) MxN mapof cannoli strewn around your city Outputs: 1. (char) MxN pathed map2. (char) a string describing your cannoli condition Topics: (iteration: pathing), (conditionals),(arrays) Background: You absolutely LOVE cannoli. Can't get enough. In fact, youPlease solve using MATLAB and ITERATION(loops). DO NOT HARDCODE!!!! CODE NEED TO WORK FOR ANY INPUT!!!!

Function Name: holyCannoli Inputs: 1. (char) MxN map of cannoli strewn around your city Outputs: 1. (char) MxN pathed map 2. (char) a string describing your cannoli condition Topics: (iteration: pathing), (conditionals), (arrays) Background: You absolutely LOVE cannoli. Can't get enough. In fact, you love them so much you're gonna drive around town with your cannoliTracker9000T to hunt down all the cannoli in the city and eat them. Better start now before the cannoli cravings get too strong! Function Description: You are given an array that contains a map of the cannoli around your city. Write a function that paths around the array, eats cannoli, and leaves a trail of where you've been. There are a few special tiles (characters) on the map to keep in mind: O o and 'v' indicate a direction change (direction-changing tiles) ">' directs you right '' directs you right O ' of them :( If you reached the stopping position, output: 'I ate cannoli, and missed v'; ...c.'; ">.cc.^.'; ..c...c'; 'c.f.c.> [pathedMap, cannolidesc] = holyCannoli (map) mapFinal [" ##'; ## ! #.c #######'; ###'l . outstr + 'I ate 5 cannoli, and missed 4 along the way!' Notes: You should replace the character at every location you path over, including the initial and final positions, any 'c', any '#', and any'.'. Paths are not guaranteed to be a set length across test cases. You might cross over previously travelled paths, but you will not be told to go out of bounds of the array. Eating over 30 cannoli and reaching the 'f' cannot occur simultaneously. The only characters present on the board at any time are c, f, and #. The starting position will always be>, ' directs you right '' directs you right O ' of them :( If you reached the stopping position, output: 'I ate cannoli, and missed v'; ...c.'; ">.cc.^.'; ..c...c'; 'c.f.c.> [pathedMap, cannolidesc] = holyCannoli (map) mapFinal [" ##'; ## ! #.c #######'; ###'l . outstr + 'I ate 5 cannoli, and missed 4 along the way!' Notes: You should replace the character at every location you path over, including the initial and final positions, any 'c', any '#', and any'.'. Paths are not guaranteed to be a set length across test cases. You might cross over previously travelled paths, but you will not be told to go out of bounds of the array. Eating over 30 cannoli and reaching the 'f' cannot occur simultaneously. The only characters present on the board at any time are c, f, and #. The starting position will always be>,

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!