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
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:
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!