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

3 次查看(过去 30 天)
It would be of great help if someone can give some suggestions, or the MATLAB command which does this operation.

采纳的回答

madhan ravi
madhan ravi 2018-10-11
编辑:madhan ravi 2018-10-11
  6 个评论
Dhananjay Mishra
Dhananjay Mishra 2018-10-11
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

请先登录,再进行评论。

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by