필터 지우기
필터 지우기

I want to get vector of det

조회 수: 2 (최근 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 CenterFile Exchange에서 Quantum Mechanics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by