The fft in MATLAB is defined as sum(x(i)*exp(-j*i*k/N)) and not sum(x(i)*exp(j*i*k/N)). The first version is traditionally used by engineers, the second version by mathematicians.