<!--
{
  "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_measqv",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vDSP_measqv"
  },
  "title" : "vDSP_measqv"
}
-->

# vDSP_measqv

Calculates the mean of squares of a single-precision vector.

```
extern void vDSP_measqv(const float *__A, vDSP_Stride __IA, float *__C, vDSP_Length __N);
```

## Parameters

`__A`

The input vector.

`__IA`

The distance between the elements in the input vector.

`__C`

On output, the mean of squares of the elements in the input vector.

`__N`

The number of elements that the function processes.

## Discussion

This function calculates the mean of squares of the first `N` elements of the input vector and writes the result to the output scalar parameter, `C`.

The following code shows an example of using [`vDSP_measqv`](/documentation/Accelerate/vDSP_measqv):

```swift
    let stride = vDSP_Stride(1)
    
    let a: [Float] = [-8, -4, -2, 0, 2, 4, 8]
    let n = vDSP_Length(a.count)
    
    var c = Float()
    
    vDSP_measqv(a,
                stride,
                &c,
                n)
    
    print(c) // Prints "24.0".
```

---

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)