From: Stefano on 4 Oct 2009 12:12 % Gauss elimination to invert A temp = [A,eye(N)]; % forward for i = 1:N % if the current row does not have a 1 in column i, find a row j > % i with a 1 in column i and add it to row i if temp(i,i) == 0 % some code here end % forward gauss elimination for j=i+1:N if temp(j,i) % code here... end end end % backward for i=N:-1:2 for j=i-1:-1:1 if temp(j,i) % some more code here... end end end invA = temp(:,N+1:end); OK? "Mostafa " <mmmedra(a)yahoo.com> wrote in message <haaf7d$edk$1(a)fred.mathworks.com>... > "Stefano " <s.mangione(a)gmail.com> wrote in message <h9tqtt$njm$1(a)fred.mathworks.com>... > > No, I'm really speaking about the binary one :) > > Don't use the xor() function, it's very slow, use mod( ,2) instead. > > > > Stefano > > > > "Mostafa " <mmmedra(a)yahoo.com> wrote in message <h9tokq$ir6$1(a)fred.mathworks.com>... > > > > > you are speaking about the inversion of the normal matrix , I am speaking about the binary one. > > > How then ? > > could you write a some code?
First
|
Prev
|
Pages: 1 2 Prev: Matlab, image, log function undefined for uint8 Next: Quantization of image and others... |