square matrix of order (vector+1 value) formed from a vector and one value?

square matrix of 4X4 should be formed from the vector [1 2 3]
i have a value to form four different combination eg. (value=0)
square matrix should be like this so the value 0 added on the diagonals
[1,2,3,0;1,2,0,3;1,0,2,3;0,1,2,3]; help me to code this by suitable logics

Risposte (0)

Questa domanda è chiusa.

Richiesto:

il 4 Ago 2015

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by