---
title: vDSP_zaspec
framework: accelerate
role: symbol
role_heading: Function
path: accelerate/vdsp_zaspec
---

# vDSP_zaspec

Computes the autospectrum of a complex single-precision vector.

## Declaration

```occ
extern void vDSP_zaspec(const DSPSplitComplex *__A, float *__C, vDSP_Length __N);
```

## Parameters

- `__A`: A single-precision vector that contains the complex input values.
- `__C`: A single-precision vector that accumulates the real output values.
- `__N`: The number of elements.

## Mentioned in

Finding the component frequencies in a composite sine wave

## Discussion

Discussion This function computes the autospectrum of the complex input vector and adds the result to the existing real values in the output vector. The function returns the product of each input element and its complex conjugate. Each element-wise product is a real value that’s the sum of the squares of the real and imaginary parts. Because the function adds its result to the existing values in the output vector, the output vector must be initialized with known values or contain valid data from a previous operation. The input and output vectors must have a stride of 1.

## See Also

### Related Documentation

- [Finding the component frequencies in a composite sine wave](accelerate/finding-the-component-frequencies-in-a-composite-sine-wave.md)

### Vector-to-Vector Spectra Computation

- [vDSP_zaspecD](accelerate/vdsp_zaspecd.md)
