Difference between values and indices?

3 次查看(过去 30 天)
Can someone give an explanation of the difference between the values of elements in a matrix vs. the indices of elements in a matrix?
Thanks.

采纳的回答

Mischa Kim
Mischa Kim 2017-10-5
编辑:Mischa Kim 2017-10-5
E.g.
A = [1 2; 3 4]
Values of/in A are 1,2,3,4. To access the 2 you would use
val = A(1,2)
(1,2) are the indices of the element of A whose value is 2.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by