How tor reshape an array

3 visualizaciones (últimos 30 días)
Molepo Alfred
Molepo Alfred el 2 de Ag. de 2021
Editada: Matt J el 2 de Ag. de 2021
%How can I reshape A to obtain B
A=[1 0 1 1 0 1 0 1 0;1 1 0 1 0 1 0 1 1;1 1 0 1 1 1 0 0 0];
B=[1 0 1;1 0 1;0 1 0;1 1 0;1 0 1;0 1 1;1 1 0;1 1 1;0 0 0];

Respuesta aceptada

Matt J
Matt J el 2 de Ag. de 2021
Editada: Matt J el 2 de Ag. de 2021
B=reshape(A.',3,[]).'

Más respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by