Question: Write a MATLAB program that sets up a 15 40 matrix with en- tries zero everywhere except for values 1 in the positions indicated in

 Write a MATLAB program that sets up a 15 40 matrix

Write a MATLAB program that sets up a 15 40 matrix with en- tries zero everywhere except for values 1 in the positions indicated in Figure 1. The upper-leftmost 1 is in the (2,2) position while the lower- rightmost 1 is in the (13,39) position. The picture was produced using the spy(A) command. (a) Call svd to compute the singular values of A and print the results. Plot these numbers using both plot and semilogy. What is the exact rank of A? (b) For each i from 1 to rank(A), construct the rank-i matrix B that is the best approximation to A in the 2-norm. Use the command pcolor (B) with colormap (gray) to create images of these various approximations 10 15 0 15 20 25 30 35 40 Figure 1: Figure generated by spy(A) command. Write a MATLAB program that sets up a 15 40 matrix with en- tries zero everywhere except for values 1 in the positions indicated in Figure 1. The upper-leftmost 1 is in the (2,2) position while the lower- rightmost 1 is in the (13,39) position. The picture was produced using the spy(A) command. (a) Call svd to compute the singular values of A and print the results. Plot these numbers using both plot and semilogy. What is the exact rank of A? (b) For each i from 1 to rank(A), construct the rank-i matrix B that is the best approximation to A in the 2-norm. Use the command pcolor (B) with colormap (gray) to create images of these various approximations 10 15 0 15 20 25 30 35 40 Figure 1: Figure generated by spy(A) command

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!