How can we transpose a row vector into column vector in a cell

11 visualizaciones (últimos 30 días)
I want to convert a row vector in my defined cell into coulumn vector
A{1} = [1 2 3 4];
A{2} = [5 6 7 8];
I want to convert them into
A{1}=[1;2;3;4];
A{2}=[5;6;7;8];
Can this be done with a simple function

Respuesta aceptada

madhan ravi
madhan ravi el 22 de Ag. de 2019
cellfun(@(x) x(:),A,'un',0)

Más respuestas (0)

Categorías

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

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by