inv2.m

来自「压缩文件中是Error Correction Coding - Mathemat」· M 代码 · 共 22 行

M
22
字号
function Ainv = inv2(A)%function Ainv = inv2(A)% Compute the inverse of a binary matrix A% Todd Moon% Copyright 2004 by Todd K. Moon% Permission is granted to use this program/data% for educational/research only[m,n] = size(A);if(m < n)  error('Matrix should be square or tall');end[lu,ind] = lu2(A);indb = zeros(m,1);Ainv = [];for i=1:n  if(i>1) b(i-1) = 0; end;  b(i) = 1;  Ainv = [Ainv lubksub2(lu,ind,b)];end

⌨️ 快捷键说明

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