Create a diagonal matrix from a vector
3 次查看(过去 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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!