function z = pathlcp(M,q)
% syntax z = pathlcp(M,q)

if nargin < 2
  error('must have two input arguments for pathlcp(M,q)');
end
q = q(:); n = length(q);
Big = 1e20;
[mm,mn] = size(M);
if (mm ~= mn | mm ~= n) 
  error('dimensions of M and q must match');
end

u = Big*ones(n,1);
l = zeros(n,1);
z = ones(n,1);

M = sparse(M);
nnzJ = nnz(M);
  
[status]  = lcppath(n, nnzJ, z, l, u, M, q);
if (status ~= 1) 
  status,
  error('Path fails to solve problem');
end
return;


