mp.m
来自「用matlab写的五种矩阵求逆程序」· M 代码 · 共 12 行
M
12 行
function inverse = mp(A)
%MP compute the inverse of the input matrix
SIZE = size(A);
if SIZE(1) ~= SIZE(2)
error('the matrix must be square.');
end
if det(A) == 0
error('the matrix should be nonsingular.');
end
inverse = pinv(A);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?