フィルターのクリア

I want to get vector of det

4 ビュー (過去 30 日間)
Jonghun
Jonghun 2013 年 7 月 28 日
-my code-
a=[1 0 0 0]; b=[0 1 0 0]; c=[0 0 1 0]; d=[0 0 0 1];
detvector=det([a b c d]);
-I want to get detvector=[det([a(1) b(1) c(1) d(1)]),det([a(2) b(2) c(2) d(2)]),det([a(3) b(3) c(3) d(3)]),det([a(4) b(4) c(4) d(4)])]. But my code doesn't works. How can I solve it?
  1 件のコメント
Jan
Jan 2013 年 7 月 28 日
編集済み: Jan 2013 年 7 月 28 日
Please follow the "? Help" link to learn how to format code in the forum. Thanks.
Instead of posting "my code does not work", an explicit description would be more useful: Post the code and a copy of the error message, or explain the difference between your expectations and the results.

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

採用された回答

Roger Stafford
Roger Stafford 2013 年 7 月 28 日
If you express the matrix properly as a 4 x 4 matrix,
det([a;b;c;d]),
matlab will give you its determinant. Your expression
[a b c d]
is that of a 1 x 16 row vector and it is meaningless to speak of its "determinant".
However, you don't need matlab to find the determinant you apparently have in mind. Of the twenty-four products that comprise this determinant, only one is non-zero and that will be the product of the four 1's, giving you a resultant determinant value of 1.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by