Homework 3 (v1) Solution

$35.00 $24.00

1) You have bought a new (nano-)smart-watch, that has a touch screen of size 10×10 pixels. In other words its screen consists of a matrix of 10 rows and 10 columns where every element is a non- negative integer. However no matter how much you touch it, its zooming feature is not working. You decide…

You’ll get a: . zip file solution

 

 
Categorys:

Description

5/5 – (2 votes)

1) You have bought a new (nano-)smart-watch, that has a touch screen of size 10×10 pixels. In other words its screen consists of a matrix of 10 rows and 10 columns where every element is a non- negative integer. However no matter how much you touch it, its zooming feature is not working. You decide to fix it.

 

Code a function (in C/C++ or Java), that admits as input an integer valued matrix A with non- negative elements, of size 10×10, an integer zooming factor z > 1 and an interpolation strategy s.

 

Your function should then return an enlarged matrix A by z times according to the chosen strategy s. Your function must support nearest neighbor interpolation (5 points), bilinear interpolation (10 points) and bicubic interpolation (15 points).

 

Send the source files as a single archive, and examples/screenshots of use for all strategies, for z = 2 and z = 3.

 

2) Code a function (in C/C++ or Java), that admits an array of coordinates. Your function should then return the divided differences polynomial passing through all the given coordinates. Send your source files, and screenshots of your function’s execution (30 points).

 

3) Code a function (in C/C++ or Java), that admits an array of coordinates and a integer m. Your function should then return the least squares polynomial of degree at most m fitting the given coordinates. Send your source files, and screenshots of your function’s execution (40 points).

 

Good luck.