Have a matrix (360,1), I want to put every 3 elements in a row, the next 3 elements in the second row in new matrix and so on to be the new matrix (120,3).

 Respuesta aceptada

KSSV
KSSV el 5 de Jun. de 2020

1 voto

A = rand(360,1) ;
iwant = reshape(A,3,[])';

3 comentarios

Stephen23
Stephen23 el 5 de Jun. de 2020
Better to use transpose rather than conjugate transpose.
bashar halleem
bashar halleem el 5 de Jun. de 2020
Thanks Stephen
bashar halleem
bashar halleem el 5 de Jun. de 2020
Thanks kssv

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2019a

Preguntada:

el 5 de Jun. de 2020

Comentada:

el 5 de Jun. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by