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

4 vues (au cours des 30 derniers jours)
Vinay Killamsetty
Vinay Killamsetty le 22 Août 2019
Commenté : Vinay Killamsetty le 22 Août 2019
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

Réponse acceptée

madhan ravi
madhan ravi le 22 Août 2019
cellfun(@(x) x(:),A,'un',0)

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by