<< MATDET Matrix_pal MATDIV >>

Scilab Help >> Xcos > palettes > Matrix_pal > MATDIAG

MATDIAG

Create Diagonal Matrix

Block Screenshot

Contents

Description

The MATDIAG block create a diagonal matrix from a 1D vector. If the input is a Mx1 vector than the output is an MxM matrix.

The equivalent function of MATDIAG in Scilab is diag(vm) with vm a column vector.

Parameters

Default properties

Examples

If the input of the block is U = ones(5, 1) then the output is:
y = [1 0 0 0 0 ; 0 1 0 0 0 ; 0 0 1 0 0 ; 0 0 0 1 0 ; 0 0 0 0 1]

Diagonal example:

Interfacing function

Computational function

See also


Report an issue
<< MATDET Matrix_pal MATDIV >>