inv_pseudo.m

来自「This a collection of MATLAB functions fo」· M 代码 · 共 13 行

M
13
字号
function B = inv_pseudo(A)
%function B = inv_pseudo(A)
%
% The Moore-Penrose pseudo-inverse (or generalised inverse). 
%
% Computes B such that B*A = I. (Note, A*B will not equal I, in general, 
% unless A is invertible.) Commonly used to solve to over-constrained
% systems of the form, A*x = c, in the least-squares sense, x = B*c.
%
% Tim Bailey 2007.

B = (A'*A)\A'; % or B = inv(A'*A)*A';

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?