Is there an algorithm/ way to get user defined pseudo inverse of a matrix?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Bjorn Gustavsson
el 27 de Jun. de 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 comentarios
Ver también
Categorías
Más información sobre Mathematics and Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!