Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
It would be of great help if someone can give some suggestions, or the MATLAB command which does this operation.

Respuesta aceptada

madhan ravi
madhan ravi el 11 de Oct. de 2018
Editada: madhan ravi el 11 de Oct. de 2018
vertcat(A,A)
  6 comentarios
Dhananjay Mishra
Dhananjay Mishra el 11 de Oct. de 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

Iniciar sesión para comentar.

Más respuestas (1)

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

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by