Is there an algorithm/ way to get user defined pseudo inverse of a matrix?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Bjorn Gustavsson
le 27 Juin 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 commentaires
Voir également
Catégories
En savoir plus sur Mathematics and Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!