# Fourier Transform within a certain Limit

I want to evaluate fourier transform within a certain limit in MATLAB,the expression of which is

$$X(f) = \int_{1}^{4}{x(t)e^{-i2\pi ft}}\,dt$$

I have to find value of the above expression within limits which are definite in nature.

I came across this post on MATLAB discussion forum which says to multiply the function by dirac(x-lowerbound) * dirac(upperbound-x) and then use fourier to calculate the desired results,but i am not getting the desired results.
What else can I try?

• Welcome to DSP. I have troubles understanding your question: do you want to compute the continuous Fourier transform of some $x$ (your formula) or to evaluate it (approximation) withing bounds? – Laurent Duval May 30 '19 at 11:41
• It might help if you just explicitly wrote down what you're looking for, like "I'm looking for $X(f)$ for $f \in [\text{lowerbound};\text{upperbound}]$, or whatever you mean. I'm just as confused as Laurent. – Marcus Müller May 30 '19 at 12:16
• @MarcusMüller,@LaurentDuval sorry for being unclear .I have edited the question.I want to calculate the fourier transform within bounds. – nebulla May 30 '19 at 14:51

$$X(f) = \int_{a}^b x(t) e^{-i2\pi ft}\,dt$$

could really be written as

$$X(f) = \int_{-\infty}^\infty (r_{a,b}(t)\cdot x(t)) e^{-i2\pi ft}\,dt$$

with $$r_{a,b}(t) = \begin{cases}1 & a i.e. as a "windowed" view at $$x(t)$$.

Luckily, the convolution theorem of the Fourier transform allows us to say that

$$\mathcal F\{r_{a,b}\cdot x\} = \mathcal F\{r_{a,b}\}*F\{x\}$$ with $$*$$ being the convolution operator.

Thus, you'd just need to numerically determine an estimate for the Fourier transform of $$x$$, $$F\{x\}$$, and convolve that with the Fourier transform of your window $$r$$. Luckily, the Fourier transform of a unity-wide rectangle is known (it's a sinc function), and you just need to apply the scale and shift theorems of the Fourier transform to convert that standard sinc to the Fourier transform $$F\{r_{a,b}\}$$.

Then you'd need to estimate the convolution of the two.

Assuming your signal is well-behaved (especially: band-limited), a discretized signal $$x[n]$$ represents your $$x(t)$$, and hence, you could estimate the continuous time Fourier Transform within the signal bandwidth by doing a DFT (matlab: fft()) of sufficient samples of a period of $$x(t)$$.

As said, finding $$F\{r_{a,b}\}$$ is easy to do analytically. Simply generate the same amount of samples of $$F\{r_{a,b}\}$$ as you did for $$x(t)$$, and numerically convolve the result (matlab: convolve, filter).

This might be much more effort or much less elegant or much less accurate than simply doing numeric integration, which matlab can also do out of the box. But I'm assuming you're not interested in that, because a) it's trivial to find "matlab numerical integration" if you just look for it, so I presume you already did that and b) I'm assuming you're asking how to solve this with signal processing methods, considering the place you ask.

• I was so engrossed in dsp that i didn't thought that simple numerical integration can solve it in matlab. Sorry for this as this didn't came in my mind.I had done above integration using simple integration in matlab and it worked. – nebulla May 31 '19 at 6:13