problem solved thank you

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 2 月 22 日

0 投票

Hint:
diag(a,b) + diag(c,d)

4 件のコメント

john hollywood
john hollywood 2014 年 2 月 22 日
sorry i been stuck on this question for past couple hours. it would be great help you if you could explain lil more. thanks, much appreciated
Walter Roberson
Walter Roberson 2014 年 2 月 22 日
Did you try playing with the Example on the diag documetnation? Assign an integer value to "m" and then run the line of code and see what it gives. Then start picking apart the parts of the expression to see how the parts fit together.
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].

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2014 年 2 月 22 日

編集済み:

2014 年 2 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by