MATLAB: Problem to transform a signal with fft

fft

i have the signal
h(t)=sinc((10^3)*t)
and i want to transform it to fourier with fft. Can you tell me the right way because it confuses me?

Best Answer

start_time = 0;
end_time = 20; %for example
t = linspace(start_time, end_time, 501); %create time vector
h = sinc(10^3*t);
hf = fft(h);
Now hf is the transformed value. It will have complex coefficients.