Sym Matrices can be Indexed with non-Logical/non-Integer. Bug?
조회 수: 2 (최근 30일)
이전 댓글 표시
Linear indexing into a sym array:
A = sym([1 2;3 4])
A(.5)
A(1.1)
A([1.2 2.2])
But element indexing produces an error
A(1.2,2.2)
But note that the error message is about the index in position 2. For a real array the error is the index in the first position.
I assume that this is a bug?
댓글 수: 2
Bjorn Gustavsson
2021년 9월 1일
It seems to be happy to treat A as a 1-D array, or a 2-D array with rounding of the first-dimension index, as long as the second index is an integer. This is clearly a "feature".
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Number Theory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!