
function data = svm_gen_data(np,nm)

y = [ones(np,1); -ones(nm,1)];

Xp = randn(np,2);
Xp(:,1) = Xp(:,1)+1.0;
Xp(:,2) = Xp(:,2)+1.0;

Xm = randn(nm,2);
Xm(:,1) = Xm(:,1)-1.0;
Xm(:,2) = Xm(:,2)-1.0;

X = [Xp; Xm];

data = struct('y',y,'X',X);


