Function Name: asciiResize Inputs: 1. (char) An M x N array of characters 2. (do
ID: 669481 • Letter: F
Question
Function Name: asciiResize
Inputs: 1. (char) An M x N array of characters 2. (double) A positive value greater than or equal to 1 specifying the scale factor
Outputs: 1. (char) The resized character array of the input
Notes: ? The same scale factor is applied to the horizontal and vertical dimensions. ? If the scale factor is not an integer, you should round the third input of linspace() to obtain the number of new rows and columns. ? Included in the test cases are ‘.mat’ files. Typing load(‘<file_name>.mat’) into the Command Window, or double-clicking the ‘.mat’ file in the Current Directory, will load any variables saved in the file to the Workspace. ? Included ASCII art creation courtesy of the internet.
Hints: ? Consider editing the vecResize() function (from Homework 04) and using it as a helper function to find the needed resized indices in a given dimension (rows versus columns).
Here is the description of the vecResize function in case it helps you to answer this question (although please note I am only asking for the answer to the asciiResize question):
Explanation / Answer
vecrsize()
x+1
size(x)
min (size(y),k)
b=imresize(A,scale)
b=imersize(a,outputsize)
gpuarrayB=imergsize(garraysize,scale)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.