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.

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
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
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,