Main Content

Generate Diagonal Matrix from Vector Input

This example shows how to use the Create Diagonal Matrix block.

Open the Simulink model.

The Create Diagonal Matrix block creates a diagonal matrix from the input values. The output matrix in the model has the input vector as its diagonal.

Run the model to verify the output.