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

3 ビュー (過去 30 日間)
Dhananjay Mishra
Dhananjay Mishra 2018 年 10 月 11 日
回答済み: Torsten 2018 年 10 月 11 日
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
madhan ravi
madhan ravi 2018 年 10 月 11 日
See edited

サインインしてコメントする。

その他の回答 (1 件)

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by