{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# proj3 - A Apply nullmat to the matrices in problem 1 Hint...

This preview shows page 1. Sign up to view the full content.

MATLAB Project 3 for MAS 3114 Due Monday, November 14 1. Write a MATLAB function S=shrink(A) which accepts asinput an m × n matrix A andgivesasoutputan m × r matrix S whosecolumnsformabasisforthecolumn spaceof A .Thefunction lead(A) fromproject2maybeusefulhere. Applyshrink to each of the following matrices: A = magic(6) B = [magic(3); magic(3)] C = [1 2; 3 4; 0 0] D = [1 2 0 4 0 3; 9 18 3 54 0 12; 9 18 0 36 1 20; 3 6 1 18 0 4] E = rand(4,3) F = [0 0; 1 2; 3 4] 2. Write a MATLAB function E=expand(A) which accepts asinput an m × n matrix A whose columns are linearly independent and gives as output an m × m matrix E which contains A as a submatrix and whose columns form a basis for R m . If the columns of A are linearly dependent your function should return an appropriate error message. Apply the function expand to each of the matrices in problem 1. 3. Write a MATLAB function N=nullmat(A) which takes as input a matrix A , and gives as output a matrix N whose nullspace is equal to the column space of A . Apply nullmat
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: A . Apply nullmat to the matrices in problem 1. Hint: Recall that the column space of an m × n matrix A is equal to { v b ∈ R m : Avx = v b has a solution } . Treating the entries of v b as variables we rewrite the equation Avx = v b as Avx-I m v b = v 0, or in partitioned matrix form, [ A,-I m ] b vx v b B = v . Applying the row reduction algorithm to the matrix [ A,-I m ] we get equations in the x i and b j . The equations in the b j which do not involve any x i determine the column space of A . For instance, [ A,-I 4 ] = 1 5 6-1 2 6 8-1 3 7 10-1 4 8 12-1 ⇒ 1 0 1 0 0 2-1 . 75 0 1 1 0 0-1 . 75 0 0 0 1 0-3 2 0 0 0 0 1-2 1 , so the column space of A is the solution to the system b 1-3 b 3 + 2 b 4 = 0 b 2-2 b 3 + b 4 = 0 ....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online