> ## 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/libraries/images/matrix__getdiagonal_00.svg?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=355e726dfd56b813272de2f10ada4977)

## 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/libraries/matrix/matrix)
