updated spike_AR.m