Filter löschen
Filter löschen

Create a diagonal matrix from a vector

1 Ansicht (letzte 30 Tage)
pavlos
pavlos am 30 Okt. 2012
Hello,
Consider a 1x7 vector.
How can I create a 7x7 matrix where the main diagonal elements are zeros (m(i,i)=0) and m(i,j)=m(j,i)?
where,
i=1,...,7 the rows index
j=1,...,7 the columns index
  2 Kommentare
Matt J
Matt J am 30 Okt. 2012
What is "m"?
Matt J
Matt J am 30 Okt. 2012
Bearbeitet: Matt J am 30 Okt. 2012
You should edit your post's title. This isn't really asking for a "diagonal matrix".

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 30 Okt. 2012
Bearbeitet: Matt J am 30 Okt. 2012
m(1)=0;
toeplitz(m)

Weitere Antworten (0)

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by