# freq

Generate a vector of frequency locations.

## Syntax

f = freq(time)

f = freq(n,fs)

## Inputs

`time`- A vector of equally spaced times.
`n`- The number of points.
`fs`- The sampling frequency.

## 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
specified:

`f = freq(10,1000)`

```
f = [Matrix] 1 x 10
0 100 200 300 400 500 600 700 800 900
```

## Comments

freq is typically used to create x axis values for a plot with frequency domain data. The most common y dimensions are FFT magnitudes and PSD values. The output is for the two-sided spectrum. The frequencies for the negative side of the spectrum are located above the Nyquist frequency.