# freq

Generate a vector of frequency locations.

## Syntax

f = freq(time)

f = freq(n,fs)

f = freq(..., option)

## Inputs

time
A vector of equally spaced times.
Type: double
Dimension: vector
n
The number of points.
Type: integer
Dimension: scalar
fs
The sampling frequency.
Type: double
Dimension: scalar
option
'twosided'
Full range is produced, with 'negative' frequencies to the right of the centered Nyquist value.
'onesided'
Only non-negative frequencies are created.
'shift'
Full range is produced, with 'negative' frequencies to the left of the centered DC value.
Type: string

## Outputs

f
The vector of frequencies.

## Examples

Example with time vector:

f = freq([0:0.001:0.009])
f = [Matrix] 1 x 10
0  100  200  300  400  500  600  700  800  900
Example with sampling frequency and 'shift' option specified:
f = freq(10,1000,'shift')
f = [Matrix] 1 x 10
-500  -400  -300  -200  -100  0  100  200  300  400