Question 4 Write a function buildstr that will receive a character and a positive integer n It

Question 4: Write a function buildstr that will receive a character and a positive integer n. It will create and return a cell array with character vectors of increasing lengths, from 1 to the integer n. It will build the character vectors with successive characters in the ASCII encoding. >> buildstr(a,4) ans = aababcabcd Next, run your code and copy the output from the command window to Notepad (or a Word file) and save it as "lab8_output.txt" or "lab8_output.doc" in the "lab8" folder. Please include your name and lab section at the top. Finally, submit your work to Canvas. You should submit two files: "lab8_output.txt" (or Word file) and "lab8.m". If you wrote the function in a separate file, please submit that function as well.

Question 4: Write a function buildstr that will receive a character and a positive integer n. It will create and return a cell array with character vectors of increasing lengths, from 1 to the integer n. It will build the character vectors with successive characters in the ASCII encoding.

>> buildstr(a,4)
ans = aababcabcd

Next, run your code and copy the output from the command window to Notepad (or a Word file) and save it as “lab8_output.txt” or “lab8_output.doc” in the “lab8” folder. Please include your name and lab section at the top.

Finally, submit your work to Canvas. You should submit two files: “lab8_output.txt” (or Word file) and “lab8.m”. If you wrote the function in a separate file, please submit that function as well.


 
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.

 
Instant
Download

Student review: (3 ratings) 3 out of 3 people found this solution helpful.