fourier() is the routine from the symbolic toolbox whose primary purpose is to take the fourier transform of formulas .
You do not have a formula, you have double precision data. That calls for fft()
Note: fft() assumes that what you have is infinitely repeatable, that it is a periodic signal. I suspect that if you were to place two copies of your f beside each other and were to look very closely, that you would see that you do not have the period you were expecting. To get the period you are probably expecting, you would have to cut T short by one sample on either the left or the right.
For example it is common for people to do something like sin(linspace(0,2*pi)) and fft that. However, this both begins and ends with 0, and if you were to put two copies beside each other you would get a [0 0] in the middle. To get a continuous signal you would do something like,
T = linspace(0,2*pi);
T(end) = []; %now it does not return to 0
fft(sin(T))