How to select matrix data for looping?

조회 수: 1 (최근 30일)
Krishna Subiyanto
Krishna Subiyanto 2019년 10월 20일
편집: Krishna Subiyanto 2019년 10월 20일
Hello,
I have matrix data let say matrix A = 100 x 100, i would like to select matrix with size 10 x 10 from matrix A and then stored in a new matrix. I would like to repeat this for all other data in matrix A, for example new matrix 1 contain row 1 to 10 and column 1 to 10, new matrix 2 contain row 11 to 20 and so on, this also applies to the column. the output will be i have 100 new matrix with size 10 x 10 from the matrix A.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 10월 20일
편집: KALYAN ACHARJYA 2019년 10월 20일
More:
A=randi(100,100)
result=mat2cell(A,repmat(10,1,10),repmat(10,1,10));
result
  댓글 수: 1
Krishna Subiyanto
Krishna Subiyanto 2019년 10월 20일
편집: Krishna Subiyanto 2019년 10월 20일
thank you very much, it works.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by