Borrar filtros
Borrar filtros

transform a 3d matrix into cell array

28 visualizaciones (últimos 30 días)
Ano
Ano el 9 de Jun. de 2017
Editada: Andrei Bobrov el 9 de Jun. de 2017
hello I would like to transform m by n by k matrix into cell array as k by 1 where each cell contain m by n matrix, how can I do it ?? I have tried the following code but I get a 1X1 cell
Mycell= mat2cell(Mymatrix, m , n,ones(k,1));

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 9 de Jun. de 2017
Editada: Andrei Bobrov el 9 de Jun. de 2017
Mycell = num2cell(Mymatrix,[1 2])
or
Mycell = squeeze(num2cell(Mymatrix,[1 2]))

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