<< MATDET Matrix operation palette MATDIV >>

Справка Scilab >> Xcos > palettes > Matrix operation palette > MATDIAG

MATDIAG

Create Diagonal Matrix

Block Screenshot

Contents

Palette

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.

Dialog box

Example

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]

Default properties

Interfacing function

Computational function

See also


Report an issue
<< MATDET Matrix operation palette MATDIV >>