Difference between values and indices?

9 ビュー (過去 30 日間)
Jack
Jack 2017 年 10 月 5 日
コメント済み: Jack 2017 年 10 月 5 日
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.
  1 件のコメント
Jack
Jack 2017 年 10 月 5 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by