function [A, b] = GetData(x, m, kappa, pfail)
% Get dimension of x
n = length(x);

% Generate A = Q * D
Q = randn(m, n);
D = diag(linspace(1/kappa, 1, n));
A = Q * D;

% Compute b
b = (A * x).^2 + (rand(m, 1) < pfail).* randn(m, 1) * 5;

end % End function



