<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP_zcoher",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_zcoher"
  },
  "title" : "vDSP_zcoher"
}
-->

# vDSP_zcoher

Computes the coherence function of two single-precision vectors.

```
extern void vDSP_zcoher(const float *__A, const float *__B, const DSPSplitComplex *__C, float *__D, vDSP_Length __N);
```

## Parameters

`__A`

Single-precision real input vector, with a stride of 1.

`__B`

Single-precision real input vector, with a stride of 1.

`__C`

Single-precision complex input vector, with a stride of 1.

`__D`

Single-precision real output vector, with a stride of 1.

`__N`

The number of elements to process.

## Discussion

This function computes the coherence function of two signals. The  inputs are the signals’ autospectra, real vectors `A` and `B`, and their cross-spectrum, complex vector `C`. Results are left in `D`.

(The autospectra and the cross-spectrum can be obtained from [`vDSP_zaspec`](/documentation/Accelerate/vDSP_zaspec) and [`vDSP_zcspec`](/documentation/Accelerate/vDSP_zcspec) respectively.)

![mathematical formula](images/com.apple.accelerate/media-2557787@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)