Menu

[Solved]Function Name Redsolocup Inputs 1 Double Length Base Pyramid Char Character Build Pyramid Q37066545

Function Name: redSolocup Inputs: 1. (double) The length of the base of the pyramid (char) The character to build the pyramidNeed Help with MATLABplease

Function Name: redSolocup Inputs: 1. (double) The length of the base of the pyramid (char) The character to build the pyramid 2. Outputs 1. (char) The created pyramid of characters Background: Chad, Brad, Kyle, Mike, and Drew are back and better than ever. After their intense battle for MATLAB’s heart the gang decided to kick back and throw down. They invited over the whole gang for a party and everyone was there! Unfortunately for Chad he’s on cleaning duty and their guests were not considerate. Red Solo cups are everywhere. Luckily Chad is an the structure of his stack. 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 <(2length 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 ASCIl values for this array have been printed below with the pyramid character’s value highlighted) Homework 13 – Recursion 32 32 32 32 32 32 32 32 32 47 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 47 32 47 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 47 32 47 32 47 32 32 32 32 32 32 32 32 32 32 32 32 32 47 32 47 32 47 32 47 32 32 32 32 32 32 32 32 32 32 32 47 32 47 32 47 32 47 32 47 32 32 32 32 32 32 32 32 32 47 32 47 32 47 32 47 32 47 32 47 32 32 32 32 32 32 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 32 32 32 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 32 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 32 47 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 quaranteed to be at least 1 Show transcribed image text Function Name: redSolocup Inputs: 1. (double) The length of the base of the pyramid (char) The character to build the pyramid 2. Outputs 1. (char) The created pyramid of characters Background: Chad, Brad, Kyle, Mike, and Drew are back and better than ever. After their intense battle for MATLAB’s heart the gang decided to kick back and throw down. They invited over the whole gang for a party and everyone was there! Unfortunately for Chad he’s on cleaning duty and their guests were not considerate. Red Solo cups are everywhere. Luckily Chad is an the structure of his stack. 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

Expert Answer


Answer to Function Name: redSolocup Inputs: 1. (double) The length of the base of the pyramid (char) The character to build the py… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *