필터 지우기
필터 지우기

How can I convert matrix to cell?

조회 수: 2 (최근 30일)
majid
majid 2024년 4월 15일
댓글: majid 2024년 4월 15일
Hello.
I have 400*100 matrix. I want to divide this matrix to every 4*100 matrix and then put it in the cell.
How can I do this?
A = reshape(1:40000,100,400)';

채택된 답변

Stephen23
Stephen23 2024년 4월 15일
A = reshape(1:40000,100,400)';
C = mat2cell(A,4*ones(1,100),100)
C = 100x1 cell array
{4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double} {4x100 double}
  댓글 수: 1
majid
majid 2024년 4월 15일
thankyou for your answering.

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

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by