function [A,B, L,U,P,Q] = dense_test(n,m, sparsify)

% Default arguments
if nargin < 1, n = 10; end
if nargin < 2, m = 3; end
if nargin < 3, sparsify = 1; end

A = rand(n);
B = rand(n,m);
A = diag(sum(A,2)+sum(B,2))-A;

Q = eye(n);
Q = Q(:,randperm(n));
[L,U,P] = lu(A*Q);

if sparsify,
A = sparse(A);
B = sparse(B);
L = sparse(L);
U = sparse(U);
P = sparse(P);
Q = sparse(Q);
end