Why do I get these errors:
Subscript indices must either be real positive integers or logicals.
and
Index exceeds matrix dimensions.
When trying to use the det(A)
function in MATLAB.
Tried with this code:
A = [1 2 3; 1 2 3; 1 2 3]
A =
1 2 3
1 2 3
1 2 3
det(A)
>> det(A)
Index exceeds matrix dimensions.
matrix2 =
-31 17
-70 -48
det(matrix2)
Subscript indices must either be real positive integers or logicals.