필터 지우기
필터 지우기

Create a diagonal matrix from a vector

조회 수: 1 (최근 30일)
pavlos
pavlos 2012년 10월 30일
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
Matt J
Matt J 2012년 10월 30일
What is "m"?
Matt J
Matt J 2012년 10월 30일
편집: Matt J 2012년 10월 30일
You should edit your post's title. This isn't really asking for a "diagonal matrix".

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2012년 10월 30일
편집: Matt J 2012년 10월 30일
m(1)=0;
toeplitz(m)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by