Question about Notation for Creating Matrices

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by