problem solved thank you

1 次查看(过去 30 天)
john hollywood
john hollywood 2014-2-22
thank you in ,much apprichated

回答(1 个)

Walter Roberson
Walter Roberson 2014-2-22
Hint:
diag(a,b) + diag(c,d)
  4 个评论
john hollywood
john hollywood 2014-2-22
sorry i really confuse diag([2 2 2 2 ]), diag([-1 -1 -1 -1], 2), diag([-1 -1 -1 -1],-1) i got this but its not giving the right answer . what am doing wrong ?
Star Strider
Star Strider 2014-2-22
For a 5x5 matrix, the main diagonal needs to have 5 elements: [2 2 2 2 2].

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by