> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetDiagonal

Returns the diagonal vector of the input matrix.

![](https://mintlify.s3.us-west-1.amazonaws.com/synopsys-00a47cbc/docs/scade-one/scade-one-standard-libraries/2025-r1/libraries/images/matrix__getdiagonal_00.svg)

## Interface

| Name | Kind | Type | Comment |
| - | :-: | - | - |
| N | P | N/A | Number of rows and columns in input matrix |
| A | I | numeric^N^N | Input matrix |
| v | O | numeric^N | Output vector |

**Parent topic:**[Math::Matrix](https://developer.synopsys.com/docs/scade-one/scade-one-standard-libraries/2025-r1/libraries/matrix/math_matrix)
