    

 ## On this page

  

 

 # Diagonal 

 Last update: 09.03.2026 

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

![](/sites/default/files/git_ansys/scade_one_standard_libraries_2026_r1_1/matrix__diagonal_00.svg)

## Interface

NameKindTypeCommentNPN/ANumber of rows and columns in matrixvInumeric^NInput vectorAOnumeric^N^NOutput matrix**Parent topic:**[Matrix](./matrix.md)