//// Assymetric network model
clear; nodes=251; dt=.1;
//wa=ones(nodes); ws=ones(nodes);     //unit
wa=rand(nodes,nodes,'normal'); ws=rand(nodes,nodes,'normal');  //random
for i=2:nodes; for j=1:i; wa(i,j)=-wa(j,i); end; end
for i=2:nodes; for j=1:i; ws(i,j)=ws(j,i); end; end
for i=1:nodes; wa(i,i)=0; ws(i,i)=0; end

for a=1:41; gs=(a-21)*.5;
  for b=1:41; ga=(b-21)*.5; disp([gs,ga]);
    w=gs*ws+ga*wa;
    u=2*rand(nodes,1)-1;
    for t=0:dt:100;
       s=tanh(u); normu_prev=norm(u);
       u=(1-dt)*u+dt*w*s;
    end //loop over time steps
    xgs(a)=gs; xga(b)=ga;
    u_dif(a,b)=abs(norm(u)-normu_prev);
  end //gs
end //ga
surf(xgs,xga,u_dif'); view(0,90)
