Question about Notation for Creating Matrices

1 visualizzazione (ultimi 30 giorni)
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 Commento
Stephen23
Stephen23 il 9 Feb 2019
Modificato: Stephen23 il 9 Feb 2019
"...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:

Accedi per commentare.

Risposta accettata

madhan ravi
madhan ravi il 9 Feb 2019

Più risposte (0)

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by