Sym Matrices can be Indexed with non-Logical/non-Integer. Bug?
2 views (last 30 days)
Show older comments
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 Comments
Bjorn Gustavsson
on 1 Sep 2021
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".
Answers (0)
See Also
Categories
Find more on Number Theory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!