How to specifically select columns from a matrix?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Benson Gou
el 6 de Oct. de 2018
Dear All,
For a given 2 columns matrix A. For example
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197181/image.png)
Can I extract the first 3 elements in the 2nd columns and the 4th and 5th elements in the first column by one commend?
I tried the following way but failed: First, I defined an array as follows,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197182/image.png)
Then I did A(:,r) and it did not work.
Thanks a lot. Bei Gou
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!