Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# fourier

Fourier transform

## Syntax

fourier(f,trans_var,eval_point)

## Description

fourier(f,trans_var,eval_point) computes the Fourier transform of f with respect to the transformation variable trans_var at the point eval_point.

## Input Arguments

 f Symbolic expression, symbolic function, or vector or matrix of symbolic expressions or functions. trans_var Symbolic variable representing the transformation variable. This variable is often called the "time variable" or the "space variable". Default: The variable x. If f does not contain x, then the default variable is determined by symvar. eval_point Symbolic variable, expression, vector or matrix representing the evaluation point. This variable is often called the "frequency variable".Default: The variable w. If w is the transformation variable of f, then the default evaluation point is the variable v.

## Examples

Compute the Fourier transform of this expression with respect to the variable x at the evaluation point y:

```syms x y
f = exp(-x^2);
fourier(f, x, y)```
```ans =
pi^(1/2)*exp(-y^2/4)```

Compute the Fourier transform of this expression calling the fourier function with one argument. If you do not specify the transformation variable, then fourier uses the variable x.

```syms x t y
f = exp(-x^2)*exp(-t^2);
fourier(f, y)```
```ans =
pi^(1/2)*exp(-t^2)*exp(-y^2/4)```

If you also do not specify the evaluation point, fourier uses the variable w:

`fourier(f)`
```ans =
pi^(1/2)*exp(-t^2)*exp(-w^2/4)```

Compute the following Fourier transforms that involve the Dirac and Heaviside functions:

```syms t w
fourier(t^3, t, w)```
```ans =
-pi*dirac(w, 3)*2*i```
```syms t0
fourier(heaviside(t - t0), t, w)```
```ans =
exp(-t0*w*i)*(pi*dirac(w) - i/w)```

If fourier cannot find an explicit representation of the transform, it returns an unevaluated call:

```syms f(t) w
F = fourier(f, t, w)```
```F =
fourier(f(t), t, w)```

ifourier returns the original expression:

`ifourier(F, w, t)`
```ans =
f(t)```

For further computations, remove the assumption on variable x:

`syms x clear`

The Fourier transform of a function is related to the Fourier transform of its derivative:

```syms f(t) w
fourier(diff(f(t), t), t, w)```
```ans =
w*fourier(f(t), t, w)*i```

Find the fourier transform of this matrix. Use matrices of the same size to specify the transformation variable and evaluation point.

```syms a b c d w x y z
fourier([exp(x), 1; sin(y), i*z],[w, x; y, z],[a, b; c, d])```
```ans =
[                2*pi*exp(x)*dirac(a),     2*pi*dirac(b)]
[ -pi*(dirac(c - 1) - dirac(c + 1))*i, -2*pi*dirac(d, 1)]```

When the input arguments are nonscalars, fourier acts on them element-wise. If fourier is called with both scalar and nonscalar arguments, then fourier expands the scalar arguments into arrays of the same size as the nonscalar arguments with all elements of the array equal to the scalar.

```syms w x y z a b c d
fourier(x,[x, w; y, z],[a, b; c, d])```
```ans =
[ pi*dirac(a, 1)*2*i, 2*pi*x*dirac(b)]
[    2*pi*x*dirac(c), 2*pi*x*dirac(d)]```

Note that nonscalar input arguments must have the same size.

When the first argument is a symbolic function, the second argument must be a scalar.

```syms f1(x) f2(x) a b
f1(x) = exp(x);
f2(x) = x;
fourier([f1, f2],x,[a, b])```
```ans =
[ fourier(exp(x), x, a), pi*dirac(b, 1)*2*i]```

expand all

### Fourier Transform

The Fourier transform of the expression f = f(x) with respect to the variable x at the point w is defined as follows:

Here, c and s are parameters of the Fourier transform. The fourier function uses c = 1, s = –1.

### Tips

• If you call fourier with two arguments, it assumes that the second argument is the evaluation point eval_point.

• If f is a matrix, fourier acts element-wise on all components of the matrix.

• If eval_point is a matrix, fourier acts element-wise on all components of the matrix.

• To compute the inverse Fourier transform, use ifourier.

## References

Oberhettinger F., "Tables of Fourier Transforms and Fourier Transforms of Distributions", Springer, 1990.