% Example 3.12 and 3.16 % Matrix A below is rank deficient A = [ -1 1 0 -1 0 1 0 -1 1 ]; [Q, R] = qr(A), [U, S, V] = svd(A),