Is there an algorithm/ way to get user defined pseudo inverse of a matrix?

조회 수: 5 (최근 30일)
ishan kalpa
ishan kalpa 2016년 6월 27일
댓글: ishan kalpa 2016년 6월 27일
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+

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2016년 6월 27일
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

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by