How do I convert the (n, n) matrix to a (nxn,1) vector? Any suggestions?

3 vues (au cours des 30 derniers jours)
Dhananjay Mishra
Dhananjay Mishra le 11 Oct 2018
It would be of great help if someone can give some suggestions, or the MATLAB command which does this operation.

Réponse acceptée

madhan ravi
madhan ravi le 11 Oct 2018
Modifié(e) : madhan ravi le 11 Oct 2018
  6 commentaires
Dhananjay Mishra
Dhananjay Mishra le 11 Oct 2018
Let A = [1 2; 3 4]. The output I need should look something like A = [1 2; 3 4; 1 2; 3 4; 1 2; 3 4; 1 2; 3 4]. The number of matrix to be stacked is the numeric multiplication of initial matrix dimensions
madhan ravi
madhan ravi le 11 Oct 2018
See edited

Connectez-vous pour commenter.

Plus de réponses (1)

Torsten
Torsten le 11 Oct 2018
A = [1 2; 3 4];
A = repmat(A,size(A,1)^2,1)

Catégories

En savoir plus sur Logical 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