function [H,b,c] = genData(n,s)
% genData generates the matrices and vectors that make up the data of the
% minimization problem.
%
% INPUT: n (Problem size/dimension, integer).
%        s (Seed, different seeds give different data, nonnegative
%          integer).
%
% OUTPUT H ( (n x n) symmetric positive definite matrix).
%        b (Column vector of length n).
%        c (Column vector of length n with positive elements).

seed = RandStream('mcg16807','Seed',s);
RandStream.setGlobalStream(seed)

% Generate H by a Cholesky factorization
H = tril(2*rand(n)-ones(n))+1.5*eye(n);
H = H*H';

% Generate c
c = rand(n,1)/10;

% Generate b
b = 10*rand(n,1)-5*ones(n,1);

end

