Borrar filtros
Borrar filtros

Create a diagonal matrix from a vector

1 visualización (últimos 30 días)
pavlos
pavlos el 30 de Oct. de 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 comentarios
Matt J
Matt J el 30 de Oct. de 2012
What is "m"?
Matt J
Matt J el 30 de Oct. de 2012
Editada: Matt J el 30 de Oct. de 2012
You should edit your post's title. This isn't really asking for a "diagonal matrix".

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 30 de Oct. de 2012
Editada: Matt J el 30 de Oct. de 2012
m(1)=0;
toeplitz(m)

Más respuestas (0)

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by