<!--
{
  "availability" : [
    "iOS: 8.0.0 - 14.0.0",
    "iPadOS: 8.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "macOS: 10.10.0 - 11.0.0",
    "tvOS: 8.0.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 1.0.0 - 7.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/la_vector_from_matrix_col(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@la_vector_from_matrix_col"
  },
  "title" : "la_vector_from_matrix_col(_:_:)"
}
-->

# la_vector_from_matrix_col(_:_:)

Creates a vector from the specified column of the matrix.

```
func la_vector_from_matrix_col(_ matrix: la_object_t, _ matrix_col: la_count_t) -> la_object_t
```

## Parameters

`matrix`

Matrix from which to create the column vector.

`matrix_col`

The zero-based index of the column to create the vector from.

## Return Value

The resulting vector is a rows(matrix) x 1 vector.

## Discussion

Creates a vector from the specified column of the matrix.  If the value for
`matrix_col` is less than zero or greater than `cols(matrix)-1`,
`LA_INVALID_PARAMETER_ERROR` is returned.

If matrix is a splat, `LA_INVALID_PARAMETER_ERROR` is returned.

Always returns a `vector_length x 1` vector.

---

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)