add index to matrix's rows
Mostrar comentarios más antiguos
I have a matrix like below:
A= [1 2 4
3 4 2
2 4 5]
With n rows and three columns. I would like to create the following
1: 1 2 4
1: 3 4 2
1: 2 4 5
Thank you all in advance.
2 comentarios
the cyclist
el 1 de Jun. de 2016
Can you be more specific about what you mean by "I would like to create the following"? For example, do you want to
- display those strings to the command window?
- create or display a cell array with text and numeric entries?
Please give us more detail.
Maryam Hamrahi
el 1 de Jun. de 2016
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!