From help-octave-request at bevo dot che dot wisc dot edu Tue Jan 23 19:07:05 2001 Subject: Re: RREF (row reduce echelon form) From: Francesco Potorti` To: "J. R. Miller" CC: help-octave at bevo dot che dot wisc dot edu Date: Wed, 24 Jan 2001 02:06:24 +0100 I seem to recall several years ago there was an octave command or function "RREF" (row reduce echelon form), for whatever version of Octave corresponded to Debian 1.2 or 1.3. Returning, I can't find "RREF". If I'm just not seeing it, please tell me where to look, or how to setup. If it's not part of Octave, is there somewhere fellow users share this kind of code, so I don't have to reinvent the wheel? I have a couple in my octave mail archive. Here is one: Date: Tue, 16 May 2000 08:46:52 +0200 (SAST) From: Dirk Laurie Subject: Re: Matlab rref equivalent? In-reply-to: from To: trax at the-force dot za dot org (Stéfan van der Walt) Cc: help-octave at bevo dot che dot wisc dot edu [...] function [R,k]=rref(A,tol) % reduced row echelon form [m,n]=size(A); p=max(m,n); if nargin<2, tol=p*eps*norm(A,inf); end % pad matrix with zeros to make it square if m~=n, A(p,p)=0; end [L,U,P]=lu(A); k=find(abs(diag(U))>tol); R=U(k,k)\U(k,:); % remove added columns if any, add correct number of zero rows if n