필터 지우기
필터 지우기

Using mat2cell

조회 수: 13 (최근 30일)
Sebastian Daneli
Sebastian Daneli 2022년 1월 23일
댓글: Sebastian Daneli 2022년 1월 23일
This is the third time that I'm forced to write a question about mat2cell since the explanation Matlab gives about said command offers no insight. I have a 2840x256, and I would like create 20 cells, each of 142*256. Is there any alternative to mat2cell, since I cannot understand how this command work.

채택된 답변

Matt J
Matt J 2022년 1월 23일
You can use mat2tiles from,
Example:
A=rand(2840,256);
Acell=mat2tiles(A,[142,256])
Acell = 20×1 cell array
{142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double}
  댓글 수: 1
Sebastian Daneli
Sebastian Daneli 2022년 1월 23일
Thanks.

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

추가 답변 (1개)

Stephen23
Stephen23 2022년 1월 23일
M = rand(2840,256);
C = mat2cell(M,142*ones(1,20),256)
C = 20×1 cell array
{142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double}
  댓글 수: 1
Sebastian Daneli
Sebastian Daneli 2022년 1월 23일
Looks great, thanks.

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by