필터 지우기
필터 지우기

Covert matrix to sub-matrices

조회 수: 2 (최근 30일)
Jackson Barlow
Jackson Barlow 2018년 12월 6일
답변: Bruno Luong 2018년 12월 6일
i have read a data file and received my 3003660x3 matrix, but these are various trials. is there any function that i can invoke to make this into 1476 separate 2035x3 matrices as that is the size of wach data set?

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2018년 12월 6일
reshape()

Bruno Luong
Bruno Luong 2018년 12월 6일
A = reshape(yourdata, [2035,1476,3]);
A = permute(A,[1 3 2]);
Now invoking:
A(:,:,k)
returns kth matrix of size (2035 x 3), for k=1, 2, .... 1476

카테고리

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!

Translated by