Sawtooth Wave Fourier Series - General derivation and Matlab issue
The linspace is probably not what you want it to be. A 2.5kHz signal has a period of 0.4ms

tmin = 1/2500;
t = linspace(0,tmin*5,2000); % time vector [s]

or 

tmin = 1/2500;
t = linspace(-tmin,tmin*4,2000); % time vector [s]

I don't know why the amplitude is off, but at least the period is right.