Extract column 1, 4-6, 8 of an 8x8 matrix

2 visualizaciones (últimos 30 días)
VicPeters
VicPeters el 6 de Mayo de 2016
Comentada: VicPeters el 6 de Mayo de 2016
Hello everyone, I have an 8x8 matrix and and I need to extract columns 1,4-6,8 as in the matrix below:
1 2 3 4 5 6 3 1
1 3 5 6 8 7 1 0
5 3 1 7 9 2 9 2
10 61 32 45 12 62 40 51
1 2 3 4 5 6 3 1
1 3 5 6 8 7 1 0
5 3 1 7 9 2 9 2
10 61 32 45 12 62 40 51
I don't really know how to. I have being on it for a while. Please any assistance will be appreciated. Thanks

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 6 de Mayo de 2016
Editada: Azzi Abdelmalek el 6 de Mayo de 2016
A(:,[1 4:6 8])
  6 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 6 de Mayo de 2016
n=size(A,1)
out=A(randperm(n),[5 6])
VicPeters
VicPeters el 6 de Mayo de 2016
Thanks Azzi, I don't really know how to thank you enough, you made my day! It is my prayer for you that you'll get help anytime you need one.
Thanks once again!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by