Borrar filtros
Borrar filtros

How do you build multiple cell arrays from the columns of an array?

4 visualizaciones (últimos 30 días)
Given an m x N array of type double, how do you separate the columns into cells so that you have N, m x 1 cell arrays?

Respuesta aceptada

Stephen23
Stephen23 el 4 de Mayo de 2022
M = randi(9,3,5)
M = 3×5
7 8 2 5 8 3 3 2 7 6 4 2 5 4 8
C = num2cell(M,1)
C = 1×5 cell array
{3×1 double} {3×1 double} {3×1 double} {3×1 double} {3×1 double}
  3 comentarios

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by