  function [B,g,delta]=gentrs(n,trsparse)
  %function [B,g,delta]=gentrs(n,trsparse)
% generate a random (sparse) TRS problem size n 
% trsparse=1 if sparse data desired; trsparse=0 otherwise
if trsparse,
   B=sprandsym(n,n/100);
else
   B=10*randn(n);B=B+B';
end
g=10*randn(n,1);
delta=10*rand+2;
