Borrar filtros
Borrar filtros

How to turn a column vector into a 3D matrix?

6 visualizaciones (últimos 30 días)
zephyr21
zephyr21 el 24 de Jun. de 2016
Comentada: muhammad komugabe el 18 de Oct. de 2017
I have a 324x1 matrix, and I would like to put it into a 3-D 9x12 matrix of i,j,k with the first numbers in the vector going to the first layer and after that fills up start filling the second layer.

Respuesta aceptada

KSSV
KSSV el 24 de Jun. de 2016
A = rand(324,1) ;
M = 9*12 ;
N = 324/M ;
K = reshape(A,[9 12 N]) ;

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays 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