> ## 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://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/scade-one/scade-one-standard-libraries/2025-r2/libraries/images/matrix__getdiagonal_00.svg?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=4d75f2eda1beae5aba1eb874ff477336)

## 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:**[Matrix](https://developer.synopsys.com/docs/scade-one/scade-one-standard-libraries/2025-r2/libraries/matrix/matrix)
