How to solve the problem?

조회 수: 3 (최근 30일)
Darsana P M
Darsana P M 2018년 4월 26일
댓글: Darsana P M 2018년 4월 27일
I have a 198x198 matrix, an image. I need to get 3x3 matrices each from the above matrix. Total, 22 matrices, how to access each of them? can somebody help me with the code??

답변 (1개)

Walter Roberson
Walter Roberson 2018년 4월 26일
blocks = mat2cell(YourMatrix, 3*ones(1,22), 3*ones(1,22));
then you would access (for example) blocks{7,4) to give you the 7th block of 3 down, 4'th block of 3 across.
  댓글 수: 17
Walter Roberson
Walter Roberson 2018년 4월 27일
Difficult to say, as the code you posted does not define new_block.
Darsana P M
Darsana P M 2018년 4월 27일
ok sir, I will check it out. Thanks a lot for your help sir.

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

카테고리

Help CenterFile Exchange에서 Get Started with Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by