Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a function called scale whose input is a matrix representingan image and t

ID: 3610782 • Letter: W

Question

Write a function called scale whose input is a matrix representingan image and the factor by which to
scale the image’s brightness. This function returns anothermatrix representing an image. Use scalar
multiplication on all of the elements in the color image to scalethem all by the same factor. Call the
function scale for execution and choose a factor that would dim theimage by half i.e. Make all elements
in the matrix half of their original value. The function definitionis
function scaled_image = scale(input, factor)
The body of this function should only contain one line. DO NOT USEA FOR LOOP.

Explanation / Answer

function scale_image =scale(input, factor) scale_image = factor.*input;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote