function [Vtrace,Strace] = simhop(W,beta,Vinit,eta,iters)
%[Vtrace,Strace] = simhop(W,beta,Vinit,eta,iters)
%
%SIMHOP 
%
%This function simulates a Hopfield network using simple Euler integration.
%
% W     is the connection matrix (should be symmetric)
% beta  is the gain of the activation function (tanh by befault)
% Vinit is the initial condition vector for the V's
% eta   is the timestep for the Euler integration
% iters is the number of iterations to simulate
%
% Vtrace   is the V vector state of the network over time, 
%          one column per timestep in the simulation
% Strace   is the S vector state of the network over time, 
%          one column per timestep in the simulation

N = size(W,1);
Vtrace = zeros(N,iters);
Strace = zeros(N,iters);

% put the initial conditions in the first column of the trace

Vtrace(:,1) = Vinit(:);
Strace(:,1) = tanh(beta*Vtrace(:,1));

for i=2:iters
  dV= eta * % FILL IN THIS LINE
  Vtrace(:,i)=Vtrace(:,i-1)+dV;
  Strace(:,i) = tanh(beta*Vtrace(:,i));
end

