function xout = runeq(x,W,dt,N1)

f = @(z) 1./(1 + exp(-z));
trajectory = zeros(size(x,1),N1+1);
trajectory(:,1) = x;

for i1=1:N1
    x = trajectory(:,i1);
    trajectory(:,i1+1) = x + dt*(-x + f(W * x));
end

xout = trajectory;
