Difference between values and indices?

7 Ansichten (letzte 30 Tage)
Jack
Jack am 5 Okt. 2017
Kommentiert: Jack am 5 Okt. 2017
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.

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 5 Okt. 2017
Bearbeitet: Mischa Kim am 5 Okt. 2017
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.

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by