clear
close all

N  = 100;
n0 = 7;
n1 = 12;
n2 = 5;
k  = (1:n1)';

x = rand(n0,N);
y = rand(n2,N);
v = rand(n1*(n0+1)+n2*(n1+1),1);

[f1,fg1] = mlp_cgd_matlab(v,k,n1,x,y);
[f2,fg2] = mlp_cgd(v,k,n1,x,y);

disp(abs(f1 - f2));
disp(norm(fg1-fg2));
