* is the elemwise product, not the matrix product, change to dot(x(t), W)