hw4p3 - x2 = A,1:2\b R0(i = R(A b x0 R1(i = R(A b x1 R2(i =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
R0 = zeros(1000,1); R1 = zeros(1000,1); R2 = zeros(1000,1); for i=1:1000 perm = randperm(100); perm = perm(1:10); A_ = A(perm,:); b_ = b(perm); x0 = A_\b_; [U S V] = svd(A_, 0); x1 = V(:,1:2)*(S(1:2,1:2)\(U(:,1:2)'*b_));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x2 = A_(:,1:2)\b_; R0(i) = R(A_, b_, x0); R1(i) = R(A_, b_, x1); R2(i) = R(A_(:,1:2),b_,x2); end subplot(1,3,1); hist(R0); subplot(1,3,2); hist(R1); subplot(1,3,3); hist(R2);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online