Bird
0
0

Given the MATLAB code:

medium📝 Predict Output Q4 of 15
MATLAB - Linear Algebra
Given the MATLAB code:
A = [4 0; 3 -5];
[U, S, V] = svd(A);
disp(round(diag(S), 2));

What is the output?
A[6.32; 3.16]
B[5.00; 4.00]
C[7.00; 2.00]
D[4.00; 3.00]
Step-by-Step Solution
Solution:
  1. Step 1: Compute singular values of matrix A

    The singular values are the square roots of the eigenvalues of A'*A. For A = [4 0; 3 -5], compute A'*A and find eigenvalues.
  2. Step 2: Calculate and round singular values

    Eigenvalues of A'*A are 40 and 10, so singular values are approximately 6.32 and 3.16 after square root and rounding to 2 decimal places.
  3. Final Answer:

    [6.32; 3.16] -> Option A
  4. Quick Check:

    Singular values = [6.32; 3.16] [OK]
Quick Trick: Singular values = sqrt of eigenvalues of A'*A [OK]
Common Mistakes:
  • Using eigenvalues of A instead of A'*A
  • Not rounding correctly
  • Mixing singular values with matrix entries

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More MATLAB Quizzes