function X=remzero(X)

% REMZERO     Removes rows containing zeroes from a matrix or vector.
%
%             Example: x=[1 2 0 4 0 6]'
%                      x=remzero(x); 
%
%             REMZERO(X)
%
%             Christian C. Beardah 1993

[r c]=size(X);

if r>1 & c>1,
  [i j]=find(X==0);
  X(i,:)=[];
  else,
    X=X(find(X));
end;