%% Function pivotratios( M, c ) 
%%
%% By: Michael K. Pellegrino
%%
%% input: M = any KxN matrix, c=pivot column
%% output: ret = a vector of the pivot-ratios
%%

function [ret] = pivotratios( M, c )
  [nrow,ncol]=size( M );
  V=[];
  if( c > ncol )
    return;
    endif

  for i=1:nrow
    if( M(i,c) > 0 )
      V = [V M(i, ncol)/M(i,c)];
    else
      V = [V -1];
    endif
  endfor
  ret=V;
endfunction
