Starting from:
$24.99

$22.49

MATLAB Project 2 Solution

MATLAB PROJECT 2:
The goals of this project are: (1) to learn more about how to quickly generate matrices using MATLAB functions; (2) practice different ways of computing the inverse and the determinant of a matrix; (3) practice your understanding of the standard matrix of a linear transformation; (4) interpret and explain the results generated by MATLAB.
PROBLEM 1: Use MATLAB commands to efficiently (i.e. without keying each entry) enter the
matrix:𝑆 =
[
0 1 0 1 0 0 0 2 0 1 0 0 0 0 0 0 0 7 0 0 0 5 0 0 0]
. Hint: Try help diag and represent S as the sum of two matrices
having non-zero entries on different diagonals. Compute Sk for k=2,3,4,5,6. Describe in words what happens when computing Sk. Using this reasoning, what do you expect S11 to be?
PROBLEM 2: Let 𝐴 = [
2 4 6 4 5 6 3 3 1 ]. Find the first and second column of A-1 without computing the third column. Display the result as a matrix with entries rational (not decimal) fractions. Hint: You could obtain the reduced
Page 2 of 3
echelon form for an augmented matrix or solve two different systems. For the required format, search for the correct syntax using “help format”.
PROBLEM 3: Suppose a linear transformation T has the property that T([1;2])=[5;7], and T([2;1])=[3;4] where [1;2] is, as in MATLAB, the column vector with entries 1 and 2. Let A denote the standard matrix of T.
a) The information above tells you that there are matrices U and V such as 𝐴∗𝑈 = 𝑉. Define U and V. Hint: read the problem until the end. b) Using inv(U), V and matrix multiplication, compute A. c) Verify that you have the correct A by computing in MATLAB 𝐴 ∗[1;2] and 𝐴∗[2;1]. d) Compute the expression det 𝐴∙det𝑈 −det𝑉 . What general fact does this calculation illustrates? e) Compute det (𝐴+𝑈)− (det𝐴+det𝑈). What general fact does this calculation illustrates?
PROBLEM 4: Let 𝐴𝑛 be the 𝑛×𝑛 matrix with 0 on the main diagonal and 1 elsewhere.
1) For 𝑛 = 4,5,6 a) Use Matlab pre-programmed matrices (eye, ones, zeros) and matrix operations, efficiently input 𝐴𝑛 . b) Compute 𝐴𝑛−1 and display the result with rational entries. 2) Propose a general form for 𝐴𝑛−1 , expressed in terms on 𝑛. 3) Check your theory for 𝑛 = 7.
PROBLEM 5: The actual color a viewer sees on a screen is influenced by the specific type and amount phosphors on the screen. So each computer screen manufacturer must convert between the (𝑅,𝐺,𝐵) data and an international CIE standard for color, which uses three primary colors, called 𝑋,𝑌 and 𝑍. A typical conversion for short persistence phosphors is
[
.61 .29 .150 .35 .59 .063 .04 .12 .787
][
𝑅 𝐺 𝐵
] = [
𝑋 𝑌 𝑍
]. A computer program will send a stream of color information to the screen
using standard CIE data (X, Y, Z).
a) Find the equation that converts (X,Y, Z) data to the (R, G, B) data needed for the screen’s electron gun. b) Check your results: Taking (𝑅,𝐺,𝐵) = (1,2,3), compute the corresponding (𝑋,𝑌,𝑍) using the given transformation, then use the transformation you’ve obtained at (a) to transform (𝑋,𝑌,𝑍) into (𝑅_𝑛,𝐺_𝑛,𝐵_𝑛). If (𝑅𝑛,𝐺𝑛,𝐵𝑛) = (𝑅,𝐺,𝐵) , the transformation you’ve obtained at (a) is correct.

More products