0

Here you can find my data: Link 1, Link 2

and my code:

D = X;
Lr = r;
% D = rand(10,5);  %for random matrix, final result is matching
% Lr = rand(1,5);


B = eye(size(D,2))/(D'*D);
Dx = [D;Lr]; 
BLr = B-((B*Lr'*Lr*B)/(1+Lr*B*Lr')); % Row addition formula 

Fr = Dx(1,:);
Dy = removerows(Dx,1);
BFr = BLr+ ((BLr*Fr'*Fr*BLr)/(1-Fr*BLr*Fr')); % row deletion formula

B1 = BFr;
D1 = Dy;
Dinv = B1*D1';
A1 = pinv(D1);
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
  • 2
    To answer this question as it stands I would have to cut-and-paste your code, download the input data, run the code against the data, look at the output and then start thinking about why the results do not match expectations. I suggest you help SO to help you by sharing the results of your investigations into the problem. In the absence of such input I suspect that you have not made a serious attempt to solve your own problem. – High Performance Mark Dec 30 '13 at 13:07
  • I hope you realize that *the inverse* is not uniquely defined for most matrices? Why would you expect two different methods to give the same result? – Dennis Jaheruddin Dec 30 '13 at 13:49
  • max(max(abs(A1-Dinv))) giving me the result as 6.57e+004 for the two matrix which i had uploaded while for any random matrix of the same size as of D and Lr, the value is 2.22e-015 around. i am not able to find why is so high difference. I want my update matrix result Dinv to be same as A1. – Prabhankar Porwal Dec 30 '13 at 13:56
  • # Dennis Jaheruddin. I want both the results to be as close as possible not exactly match. i know for a non square matrix, exact match is not at all possible. i want to avoid inverse operation every-time so that computational effort is minimized. But mismatching of these two results is problematic for me. – Prabhankar Porwal Dec 30 '13 at 13:56
  • MY matrix is neither rank deficit nor very much ill condition. Then why this kind of mismatch occurring, i am not able to diagnose. – Prabhankar Porwal Dec 30 '13 at 14:02
  • the results obtained using Dinv is very inaccurate. Can anyone suggest me , how to correct this solution so that error is minimum. – Prabhankar Porwal Dec 30 '13 at 14:30
  • i need inverse for my further calculation. In above question SO was not able to satisfy my query as i had posted one sample matrix rather than my actual matrix. In that question D'D rank was not full. But in this present case it is full . Without correct Dinv my algo is of no use. So please help me. – Prabhankar Porwal Dec 31 '13 at 07:08

0 Answers0