필터 지우기
필터 지우기

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

조회 수: 5 (최근 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

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by