rearrange matrix to vector

3 vues (au cours des 30 derniers jours)
Knut Tutgut
Knut Tutgut le 8 Oct 2015
Commenté : Knut Tutgut le 8 Oct 2015
Hi! I need to rearrange a matrix A into a vector B as follow: A = [1,2;3,4;5,6] B = [1 2 3 4 5 6] What's the simplest way to do this? Thanks a lot, Knut

Réponse acceptée

Thorsten
Thorsten le 8 Oct 2015
B = reshape(A', 1, []);
  1 commentaire
Knut Tutgut
Knut Tutgut le 8 Oct 2015
thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by