c(:,:,1) =
1 2 3
4 5 6
c(:,:,2) =
7 8 9
10 11 12
Can anyone tell me what does (: :) mean above?

1 comentario

Stephen23
Stephen23 el 14 de Ag. de 2015
Editada: Stephen23 el 14 de Ag. de 2015
What does this have to do with cat ?

Iniciar sesión para comentar.

 Respuesta aceptada

Más respuestas (1)

Stephen23
Stephen23 el 14 de Ag. de 2015
Editada: Stephen23 el 17 de Ag. de 2015

1 voto

The documentation is a really good place to find out how things work and what they do:
In your examples the two colons mean "all elements along the first dimension (all rows), all elements along the second dimension (all columns)", whereas the 1 and 2 refer to the third dimension (page). To learn how MATLAB indexing works you should do the introduction tutorials:

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 13 de Ag. de 2015

Editada:

el 17 de Ag. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by