필터 지우기
필터 지우기

Index exceeds matrix dimensions det

조회 수: 1 (최근 30일)
An Chan
An Chan 2017년 12월 14일
편집: Jan 2017년 12월 14일
D is matrix right? why det(D) not work someone help me

답변 (2개)

Ahmos Sansom
Ahmos Sansom 2017년 12월 14일
Check the condition cond(A) or try 1/det(A):
Read:
Or Wiki!

Jan
Jan 2017년 12월 14일
편집: Jan 2017년 12월 14일
You have provided very few information, such that the readers have to guess. My idea:
You have defined "det" as a variable before:
X = randi([1, 100], [3, 3]);
det(X);
...
det = ones(2, 2);
det(X) % Indices out of range
Check this by typing into the command window:
dbstop if error
Then run the code again and when it stops, check what "det" is:
which det -all
If this is the problem, the solution is easy: Do not shadow built-in functions by local variables.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by