> ## 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.

# Diagonal

Creation of a matrix, of size N by N, with the input vector on the diagonal and 0 elsewhere.

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/scade-one/scade-one-standard-libraries/2025-r2/libraries/images/matrix__diagonal_00.svg?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=e64ee2a3a59d96c627204e3bf4a630ec)

## Interface

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

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