How can I convert 2-D array to 1-D array.
Afficher commentaires plus anciens
I am using a variable oprtn_pts. whose size is 3 2.
I want to convert this into 6*1. How can I do this?
Réponse acceptée
Plus de réponses (1)
Wayne King
le 18 Sep 2012
Modifié(e) : Wayne King
le 18 Sep 2012
oprtn_pts = randn(3,2);
oprtn_pts = reshape(a,6,1);
It takes the elements from oprtn_pts columnwise.
3 commentaires
Bhavnish
le 18 Sep 2012
Andrei Bobrov
le 18 Sep 2012
Hi Bhavnish! Please see my answer.
Bhavnish
le 18 Sep 2012
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!