1. Consider the matrix: 3 × 3: [1 2 3] A = 334 [5 6 7 Use the svd() function in MATLAB to compute A₁, the rank-1 approximation of A. Clearly state what A₁ is, rounded to 4 decimal places. Also, compute the root mean square error (RMSE) between A and A₁. 2. Use the svd() function in MATLAB to compute A₂, the rank-2 approximation of A. Clearly state what A₂ is, rounded to 4 decimal places. Also, compute the root mean square error (RMSE) between A and A2. Which approximation is better, A₁ or A₂? Explain.

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter9: Systems Of Equations And Inequalities
Section9.7: The Inverse Of A Matrix
Problem 30E
icon
Related questions
Question

I need help with question 2. Here's the code used for question 1. 

%Define matrix A

 
A = [1, 2, 3; 3, 3, 4; 5, 6, 7];

 
%Compute SVD of A

 
[U, S, V] = svd(A);

 
%Rank-1 approx

 
A1 = U(:,1) * S(1,1) * V(:,1)';

 
RMSE = sqrt(mean((A(:) - A1(:)).^2));

 
%Display A1 rounded to 4 decimal places

 
disp(round(A1, 4));

 
%Display RMSE

 
disp(RMSE);
1. Consider the matrix: 3 × 3:
[1 2 3]
A = 334
[5 6 7
Use the svd() function in MATLAB to compute A₁, the rank-1 approximation of A. Clearly state what A₁ is, rounded to 4 decimal places.
Also, compute the root mean square error (RMSE) between A and A₁.
2. Use the svd() function in MATLAB to compute A₂, the rank-2 approximation of A. Clearly state what A₂ is, rounded to 4 decimal places.
Also, compute the root mean square error (RMSE) between A and A2. Which approximation is better, A₁ or A₂? Explain.
Transcribed Image Text:1. Consider the matrix: 3 × 3: [1 2 3] A = 334 [5 6 7 Use the svd() function in MATLAB to compute A₁, the rank-1 approximation of A. Clearly state what A₁ is, rounded to 4 decimal places. Also, compute the root mean square error (RMSE) between A and A₁. 2. Use the svd() function in MATLAB to compute A₂, the rank-2 approximation of A. Clearly state what A₂ is, rounded to 4 decimal places. Also, compute the root mean square error (RMSE) between A and A2. Which approximation is better, A₁ or A₂? Explain.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Elementary Linear Algebra (MindTap Course List)
Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:
9781305658004
Author:
Ron Larson
Publisher:
Cengage Learning
College Algebra
College Algebra
Algebra
ISBN:
9781305115545
Author:
James Stewart, Lothar Redlin, Saleem Watson
Publisher:
Cengage Learning