Is there an algorithm/ way to get user defined pseudo inverse of a matrix?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is there an algorithm to get user defined pseudo inverse of a matrix? ex- CC+=E/5
C+ is the pseudo inverse of matrix C, C can be singular or non singular, E=ones(same size of C/C+) need to FIND C+
0 Kommentare
Antworten (1)
Bjorn Gustavsson
am 27 Jun. 2016
Sure, have a good look at this excellent submission on solutions of inverse problems: regtools It should get you a good start on inverse problems and inversion of singular matrices.
In short you can do something along these lines:
M = randn(4,6);
M(5,:) = M(2,:)/4 + M(4,:)*3/4; % a singular matrix
[U,S,V] = svd(M)
% Look at the singular values, one should be "rather small"
% M has a robust inverse (Tikhonov) if we replace the
% inverse of the singular values with:
Sinv_approxS = @(S,alpha) diag(diag(S)./(diag(S).^2+alpha^2));
% where alpha is a damping-factor reducing the contribution from
% eigenvectors with small singular values (sensible in cases of
% real-world noise)
% Then the Tikhonov-inverse will be (breaks down for overdetermined problems...):
alpha = 0.1;
Minv = V(:,1:size(S,2))*Sinv_approxS(S,alpha)*U';
HTH
2 Kommentare
Siehe auch
Kategorien
Mehr zu Mathematics and Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!