[solved]-Need Help Matlab Using Recursion Please Notice Use Recursion Iteration Allowed Thank Help Q39003307
Need help on MATLAB by using Recursion!!!
Please notice that Only use Recursion.
Iteration is not allowed!!!
Thank you for your help!
Function Name: redSoloCup
Inputs: 1. (double) The length of the base of the pyramid
2. (char) The character to build the pyramid
Outputs:
1. (char) The created pyramid of characters


Function Description: Write a recursive function that takes in the length of the base of the pyramid as well as any single character with which to build a pyramid (pyramid character) and outputs an array of characters that contains the pyramid. The dimensions of your array should be <length of base> by <(2*length of base)-1). Each row should have 1 more pyramid character than the row above it and a single space (ASCII value 32) should separate each pyramid character within a row. Any other index within the array that does not contain a pyramid character should be filled with a space (ASCII value 32). For example, for a pyramid of base length 10 and constructed from the character ‘/’, your function should output a 10×19 character array as shown below (in order to better visualize the actual construction of the array, the ASCII values for this array have been printed below with the pyramid character’s value highlighted) – – – – ‘ // / // // / ” / / / / / / / / / / // / // // / / 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 47 32 32 32 32 32 %B9%9B9% HBHBHB归 WWWB归8g%m% 32 32 47 32 47 32 47 47 32 47 32 47 32 47 32 47 32 47 32 47 32 Notes: • Your function should work for any base length that is less than 500, since this is MATLAB’s maximum recursion limit. • The pyramid character is guaranteed to be of length 1, and the size of the pyramid base is guaranteed to be an integer. Show transcribed image text Function Description: Write a recursive function that takes in the length of the base of the pyramid as well as any single character with which to build a pyramid (pyramid character) and outputs an array of characters that contains the pyramid. The dimensions of your array should be by
Expert Answer
Answer to Need help on MATLAB by using Recursion!!! Please notice that Only use Recursion. Iteration is not allowed!!! Thank you f… . . .
OR

