matrix arrangement problem for loop

조회 수: 2 (최근 30일)
tsai kai shung
tsai kai shung 2017년 10월 30일
댓글: tsai kai shung 2017년 10월 30일
hey guide i want arrangement the matrix like: a = [1 2 3 4 5 6 7 8.........unknown number] but matrix is A multiple of four
how to use for loop to become
a = [1 2 3 4; 5 6 7 8; 9 ....; .....unknown number];

채택된 답변

Roger Stafford
Roger Stafford 2017년 10월 30일
a = reshape(a,4,[]).';

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!