Question about Notation for Creating Matrices

1 回表示 (過去 30 日間)
Hollis Williams
Hollis Williams 2019 年 2 月 9 日
編集済み: Stephen23 2019 年 2 月 9 日
I am currently reading a piece of MATLAB code in which matrices are created, but I am not sure what exactly the notation with commas and colons denotes and was wondering if someone could clarify. I think in the code a matrix A is created and then successive rows and columns are added to it.
So for example, there is a part which is in the form A(i,j) so I take it that means to create a normal i x j matrix, but in the part above there is something in the form A(i,j:k), so exactly what kind of matrix is being created here with the colon in the middle?
  1 件のコメント
Stephen23
Stephen23 2019 年 2 月 9 日
編集済み: Stephen23 2019 年 2 月 9 日
"...I am not sure what exactly the notation with commas and colons denotes and was wondering if someone could clarify."
Basic MATLAB concepts, such as the purpose of commas and semi-colons when defining matrices, are explained in the introductory tutorials:
"...but in the part above there is something in the form A(i,j:k), so exactly what kind of matrix is being created here with the colon in the middle?"
Basic MATLAB concepts, such as how to use the colon operator to define vectors and use indexing, are explained in the introductory tutorials:

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

採用された回答

madhan ravi
madhan ravi 2019 年 2 月 9 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by