Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ECMT2160: Computational Assignment

Due: October 24, 11:59pm

This assessment task requires you to use Matlab. You should prepare your submission as a Matlab Live Script file (i.e., a .mlx file).  Submit your answers through the Canvas course website. Your submission should include a mixture of written responses formatted as text, blocks of Matlab code, and Matlab output, including graphs. I expect you to alternate between text and code blocks as I have done in the lecture notes. You should submit two versions of your answers: the original .mlx file, and a version exported to .html.

To complete the assessment task you will need to download a .mat file from Canvas, under Files > Matlab > AssessmentMatFiles.  You should use the file named xxx.mat, where xxx is your Student ID (as listed in Canvas).  This file contains a 999 × 999 matrix with the name B. You can load it into Matlab using the command load(“xxx. mat”), with the .mat file saved in the current Matlab working directory.

You may work on this assessment individually, or in pairs.  If you work in pairs (which I strongly recommend), it is important that you clearly indicate the Student ID of your partner in your submission. Your submission should not be identical to your partner’s submission because you will each be using different .mat files.

Answer all questions. The assignment is worth a total of 15 points towards your final assessment. Points will be deducted for poor presentation, including: excessive typos, poor written expression, poor organization, etcetera. Do not print any long vectors of numbers in your response.

You can ask questions about this assessment on the Ed discussion forum, but please do not answer questions asked by others.  I will answer questions as I deem appropriate.

You are free to use Google or AI to help you with this assessment.

To solve this assignment you will need to work with four real-valued func- tions of two real variables (x and y).  Each function also depends on a scalar parameter α that is equal to or greater than one.  The first function,  denoted gα(x, y), is defined by

for all x and y strictly between 0 and 1.  If either x or y is not strictly between 0 and 1 then we define gα(x, y)  =  0. The second function, denoted h α(x, y), is defined by

for all x and y strictly between 0 and 1. If either x or y is not strictly between 0 and 1 then we define h α(x, y) = 0. The third function, denoted Fα(x, y), is defined by

for all x and y strictly between 0 and 1. If either x or y is not strictly between 0 and 1 then we define h(x, y) = 0. The fourth function, denoted fα(x, y), is defined by

for all x and y strictly between 0 and 1. If either x or y is not strictly between 0 and 1 then we define f (x, y) = 0.

Answer all of the following questions.

1.  (1 point.)  Calculate (without displaying your answer) the 19 × 19 matrix for which the entry in row i and column j is equal to

Using this matrix and the mesh command in Matlab, display a 3D graph of the function g2(x, y) for x and y strictly between 0 and 1.

2.  (1 point.)  Calculate (without displaying your answer) the 19 × 19 matrix for which the entry in row i and column j is equal to

Using this matrix and the mesh command in Matlab, display a 3D graph of the function h2 (x, y) for x and y strictly between 0 and 1.

3.  (1 point.)  Calculate (without displaying your answer) the 19 × 19 matrix for which the entry in row i and column j is equal to

Using this matrix and the mesh command in Matlab, display a 3D graph of the function F2(x, y) for x and y strictly between 0 and 1.

4.  (1 point.)  Calculate (without displaying your answer) the 19 × 19 matrix for which the entry in row i and column j is equal to

Using this matrix and the mesh command in Matlab, display a 3D graph of the function f2 (x, y) for x and y strictly between 0 and 1.

5.  (1 point.) Calculate (without displaying your answer) the 999 × 999 matrix for which the entry in row i and column j is equal to

Using this matrix, verify numerically that the function f2 (x, y) is nonneg- ative and satisfies

What does this tell you about the function f2 (x, y)?

The remaining questions will require you to work with the 999 × 999 matrix specific to your student number. Call this matrix B, and call its entries bi j, where i is the row number and j is the column number.

6.  (4 points.) For α ≥ 0 define the real-valued function S (α) by

Use a “for loop” in Matlab to calculate (without displaying your answer) the 201 × 1 vector whose i-th entry is equal to

Using this vector and the p1ot command in Matlab, display a 2D graph of the function S (α) for α between 1 and 3.

7.  (1 point.) Which value ofα produces the minimum value ofS (α)? (Confine attention to the201values ofα at which you calculated S (α) in the previous question.) Let α *  denote this minimizing choice of α .

8.  (1 point.) Calculate (without displaying your answer) the 999 × 999 matrix for which the entry in row i and column j is equal to

Using this matrix, verify numerically that the function fα* (x, y) is nonneg-ative and satisfies

What does this tell you about the function fα*(x, y)?

9.  (2 points.)  Let X and Y be a continuous pair of random variables whose joint PDF is fα*(x, y) . Display 2D graphs of the marginal PDFs for X and Y using the p1ot command in Matlab.

10.  (2 points.) Calculate the covariance between the random variables X and Y introduced in the previous question.